{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": "   PassengerId  Survived  Pclass  \\\n0          493         0       1   \n1           53         1       1   \n2          388         1       2   \n3          192         0       2   \n4          687         0       3   \n5           16         1       2   \n6          228         0       3   \n7          884         0       2   \n8          168         0       3   \n9          752         1       3   \n\n                                              Name     Sex   Age  SibSp  \\\n0                       Molson, Mr. Harry Markland    male  55.0      0   \n1         Harper, Mrs. Henry Sleeper (Myna Haxtun)  female  49.0      1   \n2                                 Buss, Miss. Kate  female  36.0      0   \n3                            Carbines, Mr. William    male  19.0      0   \n4                         Panula, Mr. Jaako Arnold    male  14.0      4   \n5                 Hewlett, Mrs. (Mary D Kingcome)   female  55.0      0   \n6                  Lovell, Mr. John Hall (\"Henry\")    male  20.5      0   \n7                    Banfield, Mr. Frederick James    male  28.0      0   \n8  Skoog, Mrs. William (Anna Bernhardina Karlsson)  female  45.0      1   \n9                              Moor, Master. Meier    male   6.0      0   \n\n   Parch            Ticket     Fare Cabin Embarked  \n0      0            113787  30.5000   C30        S  \n1      0          PC 17572  76.7292   D33        C  \n2      0             27849  13.0000   NaN        S  \n3      0             28424  13.0000   NaN        S  \n4      1           3101295  39.6875   NaN        S  \n5      0            248706  16.0000   NaN        S  \n6      0         A/5 21173   7.2500   NaN        S  \n7      0  C.A./SOTON 34068  10.5000   NaN        S  \n8      4            347088  27.9000   NaN        S  \n9      1            392096  12.4750  E121        S  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>PassengerId</th>\n      <th>Survived</th>\n      <th>Pclass</th>\n      <th>Name</th>\n      <th>Sex</th>\n      <th>Age</th>\n      <th>SibSp</th>\n      <th>Parch</th>\n      <th>Ticket</th>\n      <th>Fare</th>\n      <th>Cabin</th>\n      <th>Embarked</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>493</td>\n      <td>0</td>\n      <td>1</td>\n      <td>Molson, Mr. Harry Markland</td>\n      <td>male</td>\n      <td>55.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>113787</td>\n      <td>30.5000</td>\n      <td>C30</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>53</td>\n      <td>1</td>\n      <td>1</td>\n      <td>Harper, Mrs. Henry Sleeper (Myna Haxtun)</td>\n      <td>female</td>\n      <td>49.0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>PC 17572</td>\n      <td>76.7292</td>\n      <td>D33</td>\n      <td>C</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>388</td>\n      <td>1</td>\n      <td>2</td>\n      <td>Buss, Miss. Kate</td>\n      <td>female</td>\n      <td>36.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>27849</td>\n      <td>13.0000</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>192</td>\n      <td>0</td>\n      <td>2</td>\n      <td>Carbines, Mr. William</td>\n      <td>male</td>\n      <td>19.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>28424</td>\n      <td>13.0000</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>687</td>\n      <td>0</td>\n      <td>3</td>\n      <td>Panula, Mr. Jaako Arnold</td>\n      <td>male</td>\n      <td>14.0</td>\n      <td>4</td>\n      <td>1</td>\n      <td>3101295</td>\n      <td>39.6875</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>16</td>\n      <td>1</td>\n      <td>2</td>\n      <td>Hewlett, Mrs. (Mary D Kingcome)</td>\n      <td>female</td>\n      <td>55.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>248706</td>\n      <td>16.0000</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>228</td>\n      <td>0</td>\n      <td>3</td>\n      <td>Lovell, Mr. John Hall (\"Henry\")</td>\n      <td>male</td>\n      <td>20.5</td>\n      <td>0</td>\n      <td>0</td>\n      <td>A/5 21173</td>\n      <td>7.2500</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>884</td>\n      <td>0</td>\n      <td>2</td>\n      <td>Banfield, Mr. Frederick James</td>\n      <td>male</td>\n      <td>28.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>C.A./SOTON 34068</td>\n      <td>10.5000</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>168</td>\n      <td>0</td>\n      <td>3</td>\n      <td>Skoog, Mrs. William (Anna Bernhardina Karlsson)</td>\n      <td>female</td>\n      <td>45.0</td>\n      <td>1</td>\n      <td>4</td>\n      <td>347088</td>\n      <td>27.9000</td>\n      <td>NaN</td>\n      <td>S</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>752</td>\n      <td>1</td>\n      <td>3</td>\n      <td>Moor, Master. Meier</td>\n      <td>male</td>\n      <td>6.0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>392096</td>\n      <td>12.4750</td>\n      <td>E121</td>\n      <td>S</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import tensorflow as tf\n",
    "from tensorflow.keras import models,layers\n",
    "\n",
    "dftrain_raw = pd.read_csv('./data/train.csv')\n",
    "dftest_raw = pd.read_csv('./data/test.csv')\n",
    "dftrain_raw.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 864x576 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAuIAAAHqCAYAAABBWCvPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAeFklEQVR4nO3dfbSudV3n8c+3QyQQT/KQ2aBHtBWis8YmxspykU+D2BiTE7FmapVjLRZTaBP2IC5ZCyETSHEa0ZBssnkwfCxDJQRUzLTGg2aNiLlKQmVU0MMgHlCj7/xx3TvvdbfPwz5nn/3be5/Xa629zrl/1+++79/mD9b7XOt3XVd1dwAAgLX1TaMXAAAAByIhDgAAAwhxAAAYQIgDAMAAQhwAAAYQ4gAAMMBBoxcwyrHHHttbt24dvQwAADaxm2+++a7uPm65YwdsiG/dujXbtm0bvQwAADaxqvq7nR2zNQUAAAYQ4gAAMIAQBwCAAYQ4AAAMIMQBAGAAIQ4AAAMIcQAAGECIAwDAAEIcAAAGEOIAADCAEAcAgAGEOAAADCDEAQBgACEOAAADCHEAABhAiAMAwABCHAAABhDiAAAwgBAHAIABDhq9ADa+rS94x+glwE7ddskPj14CACzLGXEAABhAiAMAwABCHAAABhDiAAAwgBAHAIABhDgAAAwgxAEAYAAhDgAAAwhxAAAYQIgDAMAAQhwAAAYQ4gAAMIAQBwCAAYQ4AAAMIMQBAGAAIQ4AAAMIcQAAGECIAwDAAEIcAAAGEOIAADCAEAcAgAGEOAAADCDEAQBgACEOAAADDA3xqvqOqrq3qrqqvnVuvKrqhVX16aq6r6reV1WPW+b9J1fVjVW1o6ruqKqLqmrL2v4WAACwcqPPiP9GknuXGX9BkguSXJrkmbM5N1TVQ5YmVNXRSW5I0knOSHJRkucnefF+XjMAAOyzYSFeVU9M8vQkL1sYf1CmEH9pd1/R3TckOTNTcJ87N/WcJIckeV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m/di4/87HyEz7wxyeFJnp4kVXVQpgtDr97F51yb5N4kZ86NnZXkD+b2nD81yfVJ7qmqg2af++UkNyc5ZTbn8Uk+vxThSdLdfzebA7DpCHGADaS7v9rd13T3ud19cpKfTfKdmbZyrNTnl/n8z2baQrK01eQpSY7NLkK8u+/PtKXkrCSZ7fv+FwvvOXZ2/OsLP09KcsJszkOSfGGZr1huDGDDszUFYAPr7t+pqsuSnDQbun/258ELUx+cZPHe3zu708obklwy27t9VpKPdPfutoa8Ick1VfWw2XvuTPLuueNfSvJHSS5e5r1fnv35uSTHL3P8+CT37eb7ATYcZ8QBNoiq+ieRWlXHJTky3zi7/ZnZn4+em3NCposk99SbkhyS5EdnP7valrLkXZn2hP94phB/c3c/MHf8xiSPSfKx7t628POJ2ZwPJfm2qvreubU/LMm/XMHaATYMZ8QBNo6/qqq3ZYreLyR5eJJfSrIjye8lSXd/pqo+lOTiqtqR6YTLCzOdkd4j3f2F2ZMsX5bplolv3IP3fL2q/iDTnU6+Pcni7QwvT/KTSd5dVa9M8tlMd2I5Ncn7u/v3k7wzyUeTvKmqfjXT2f2LYmsKsEk5Iw6wcVyU6ZaD/zVTjF+c5GNJHt/dn5qb9x+S3J7kfyb59dn7PpGVuTpTUP9Zd9+2wvfckeRP5g90911Jvi/JrUleMVv/ZZnO5v/lbE5nuhD1liT/Lcl/SXJFkg+ucO0AG4InawIAwADOiAMAwABCHAAABhDiAAAwgBAHAIABhDgAAAwgxAEAYAAhDgAAAwhxAAAYQIgDAMAA/x8gCcPGFgQEpwAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "%config InlineBackend.figure_format = 'png'\n",
    "ax = dftrain_raw['Survived'].value_counts().plot(\n",
    "    kind='bar',\n",
    "    figsize=(12,8),\n",
    "    fontsize=15,rot=0\n",
    ")\n",
    "ax.set_ylabel('Counts',fontsize=15)\n",
    "ax.set_xlabel(\"Survived\",fontsize=15)\n",
    "plt.show()\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train.shape =  (712, 15)\n",
      "x_test.shape =  (179, 15)\n"
     ]
    }
   ],
   "source": [
    "def preprocessing(dfdata):\n",
    "    dfresult = pd.DataFrame()\n",
    "\n",
    "    dfPclass = pd.get_dummies(dfdata[\"Pclass\"])\n",
    "    dfPclass.columns = ['Pclass_' + str(x) for x in dfPclass.columns]\n",
    "    dfresult = pd.concat([dfresult,dfPclass],axis=1)\n",
    "\n",
    "    dfSex = pd.get_dummies(dfdata['Sex'])\n",
    "    dfresult = pd.concat([dfresult,dfSex],axis=1)\n",
    "\n",
    "    dfresult['Age'] = dfdata[\"Age\"].fillna(0)\n",
    "    dfresult[\"Age_null\"] = pd.isna(dfdata['Age']).astype('int32')\n",
    "\n",
    "    dfresult['SibSp'] = dfdata['SibSp']\n",
    "    dfresult['Parch'] = dfdata['Parch']\n",
    "    dfresult[\"Fare\"] = dfdata['Fare']\n",
    "\n",
    "    dfresult[\"Cabin_null\"] = pd.isna(dfdata['Cabin']).astype('int32')\n",
    "\n",
    "    dfEmbarked = pd.get_dummies(dfdata['Embarked'],dummy_na=True)\n",
    "    dfEmbarked.columns =['Embarked_' + str(x) for x in dfEmbarked.columns]\n",
    "    dfresult = pd.concat([dfresult,dfEmbarked],axis=1)\n",
    "\n",
    "    return dfresult\n",
    "\n",
    "x_train = preprocessing(dftrain_raw)\n",
    "y_train = dftrain_raw['Survived'].values\n",
    "\n",
    "x_test = preprocessing(dftest_raw)\n",
    "y_test = dftest_raw['Survived'].values\n",
    "\n",
    "print(\"x_train.shape = \",x_train.shape)\n",
    "print(\"x_test.shape = \",x_test.shape)\n",
    "\n",
    "\n",
    "\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "dense (Dense)                (None, 20)                320       \n",
      "_________________________________________________________________\n",
      "dense_1 (Dense)              (None, 10)                210       \n",
      "_________________________________________________________________\n",
      "dense_2 (Dense)              (None, 1)                 11        \n",
      "=================================================================\n",
      "Total params: 541\n",
      "Trainable params: 541\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "tf.keras.backend.clear_session()\n",
    "model = models.Sequential()\n",
    "model.add(layers.Dense(20,activation='relu',input_shape=(15,)))\n",
    "model.add(layers.Dense(10,activation='relu'))\n",
    "model.add(layers.Dense(1,activation='sigmoid'))\n",
    "\n",
    "model.summary()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/30\n",
      "9/9 [==============================] - 0s 30ms/step - loss: 0.3999 - auc: 0.8851 - val_loss: 0.5523 - val_auc: 0.7949\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 2/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3967 - auc: 0.8883 - val_loss: 0.5402 - val_auc: 0.8017\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 3/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3904 - auc: 0.8917 - val_loss: 0.5375 - val_auc: 0.8014\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 4/30\n",
      "9/9 [==============================] - 0s 9ms/step - loss: 0.3924 - auc: 0.8894 - val_loss: 0.5356 - val_auc: 0.8042\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 5/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3902 - auc: 0.8908 - val_loss: 0.5364 - val_auc: 0.8012\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 6/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3917 - auc: 0.8908 - val_loss: 0.5399 - val_auc: 0.7994\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 7/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3888 - auc: 0.8919 - val_loss: 0.5372 - val_auc: 0.8024\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 8/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3881 - auc: 0.8922 - val_loss: 0.5374 - val_auc: 0.8012\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 9/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3901 - auc: 0.8918 - val_loss: 0.5361 - val_auc: 0.8021\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 10/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3876 - auc: 0.8916 - val_loss: 0.5353 - val_auc: 0.8005\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 11/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3873 - auc: 0.8923 - val_loss: 0.5369 - val_auc: 0.8023\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 12/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3870 - auc: 0.8925 - val_loss: 0.5371 - val_auc: 0.8020\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 13/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3872 - auc: 0.8926 - val_loss: 0.5359 - val_auc: 0.8002\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 14/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3871 - auc: 0.8919 - val_loss: 0.5352 - val_auc: 0.8020\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 15/30\n",
      "9/9 [==============================] - 0s 8ms/step - loss: 0.3870 - auc: 0.8924 - val_loss: 0.5355 - val_auc: 0.8031\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 16/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3866 - auc: 0.8931 - val_loss: 0.5362 - val_auc: 0.8023\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 17/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3859 - auc: 0.8928 - val_loss: 0.5371 - val_auc: 0.7990\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 18/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3870 - auc: 0.8919 - val_loss: 0.5353 - val_auc: 0.8047\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 19/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3863 - auc: 0.8923 - val_loss: 0.5358 - val_auc: 0.8049\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 20/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3860 - auc: 0.8929 - val_loss: 0.5355 - val_auc: 0.8044\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 21/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3892 - auc: 0.8911 - val_loss: 0.5372 - val_auc: 0.8003\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 22/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3881 - auc: 0.8917 - val_loss: 0.5375 - val_auc: 0.8023\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 23/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3871 - auc: 0.8932 - val_loss: 0.5350 - val_auc: 0.8041\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 24/30\n",
      "9/9 [==============================] - 0s 8ms/step - loss: 0.3880 - auc: 0.8908 - val_loss: 0.5351 - val_auc: 0.8037\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 25/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3845 - auc: 0.8930 - val_loss: 0.5376 - val_auc: 0.8027\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 26/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3874 - auc: 0.8921 - val_loss: 0.5371 - val_auc: 0.8046\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 27/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3857 - auc: 0.8925 - val_loss: 0.5359 - val_auc: 0.8040\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 28/30\n",
      "9/9 [==============================] - 0s 6ms/step - loss: 0.3848 - auc: 0.8938 - val_loss: 0.5367 - val_auc: 0.8055\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 29/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3883 - auc: 0.8911 - val_loss: 0.5364 - val_auc: 0.8050\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n",
      "Epoch 30/30\n",
      "9/9 [==============================] - 0s 7ms/step - loss: 0.3863 - auc: 0.8926 - val_loss: 0.5372 - val_auc: 0.8053\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n"
     ]
    },
    {
     "data": {
      "text/plain": "{'loss': [0.3998553156852722,\n  0.3967241048812866,\n  0.3904064893722534,\n  0.3924316465854645,\n  0.3902145028114319,\n  0.39166906476020813,\n  0.38879159092903137,\n  0.38808563351631165,\n  0.39014932513237,\n  0.3876425623893738,\n  0.3872992694377899,\n  0.3869931995868683,\n  0.38718467950820923,\n  0.38713714480400085,\n  0.386951208114624,\n  0.3866327106952667,\n  0.38590970635414124,\n  0.38696524500846863,\n  0.38625749945640564,\n  0.3860129415988922,\n  0.3891999125480652,\n  0.38811182975769043,\n  0.38711267709732056,\n  0.38800108432769775,\n  0.38453370332717896,\n  0.3873887360095978,\n  0.3857160806655884,\n  0.38481757044792175,\n  0.38829025626182556,\n  0.38631686568260193],\n 'auc': [0.8851029872894287,\n  0.8883081078529358,\n  0.8917407989501953,\n  0.8894132375717163,\n  0.8908371329307556,\n  0.8908045887947083,\n  0.891903281211853,\n  0.8922479152679443,\n  0.8917797803878784,\n  0.8915587663650513,\n  0.8922803401947021,\n  0.8924689292907715,\n  0.8925663828849792,\n  0.8919228315353394,\n  0.8924428820610046,\n  0.8931190967559814,\n  0.8927940130233765,\n  0.8919227719306946,\n  0.892306387424469,\n  0.8929044604301453,\n  0.8911166787147522,\n  0.8916952610015869,\n  0.8931645154953003,\n  0.8907850980758667,\n  0.893047571182251,\n  0.8921439051628113,\n  0.8924884796142578,\n  0.8937886953353882,\n  0.8910582065582275,\n  0.8926315307617188],\n 'val_loss': [0.5523240566253662,\n  0.5401669144630432,\n  0.537538468837738,\n  0.535563051700592,\n  0.5364301204681396,\n  0.539948582649231,\n  0.5371915102005005,\n  0.537423849105835,\n  0.5361082553863525,\n  0.5352532863616943,\n  0.5368940234184265,\n  0.5370684266090393,\n  0.5359188318252563,\n  0.5351811647415161,\n  0.5354724526405334,\n  0.5362082719802856,\n  0.537081241607666,\n  0.5352576971054077,\n  0.5357723832130432,\n  0.5355280041694641,\n  0.5371876358985901,\n  0.5374569892883301,\n  0.5350325107574463,\n  0.5351372361183167,\n  0.5376472473144531,\n  0.5371136665344238,\n  0.5359266400337219,\n  0.5367109775543213,\n  0.5363787412643433,\n  0.5371624827384949],\n 'val_auc': [0.794929027557373,\n  0.8017241358757019,\n  0.8014198541641235,\n  0.8041582107543945,\n  0.8012170195579529,\n  0.799391508102417,\n  0.8024340867996216,\n  0.8012170791625977,\n  0.8021298050880432,\n  0.800507128238678,\n  0.8023326396942139,\n  0.8020284175872803,\n  0.8002028465270996,\n  0.8020284175872803,\n  0.8031440377235413,\n  0.8023326396942139,\n  0.7989858388900757,\n  0.8046653270721436,\n  0.8048681616783142,\n  0.80436110496521,\n  0.8003042340278625,\n  0.8023326396942139,\n  0.8040568232536316,\n  0.8036510944366455,\n  0.8027383089065552,\n  0.8045638203620911,\n  0.8039553165435791,\n  0.805476725101471,\n  0.8049695491790771,\n  0.8052738904953003]}"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.compile(optimizer='adam',\n",
    "              loss='binary_crossentropy',\n",
    "              metrics=['AUC'])\n",
    "\n",
    "history = model.fit(x_train,y_train,\n",
    "                    batch_size= 64,\n",
    "                    epochs=30,\n",
    "                    validation_split=0.2)\n",
    "history.history"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "%config InlineBackend.figure_format='svg'\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "def plot_metric(history,metric):\n",
    "    train_metric = history.history[metric]\n",
    "    val_metric = history.history['val_' + metric]\n",
    "    epochs = range(1,len(train_metric)+1)\n",
    "\n",
    "    plt.plot(epochs,train_metric,'bo--')\n",
    "    plt.plot(epochs,val_metric,'ro--')\n",
    "    plt.title(\"Training and validation \" + metric)\n",
    "    plt.xlabel(\"Epochs\")\n",
    "    plt.ylabel(metric)\n",
    "    plt.legend(['train_'+metric,'val_'+metric])\n",
    "    plt.show()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 376.240625 277.314375\" width=\"376.240625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <defs>\r\n  <style type=\"text/css\">\r\n*{stroke-linecap:butt;stroke-linejoin:round;}\r\n  </style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n  <g id=\"patch_1\">\r\n   <path d=\"M 0 277.314375 \r\nL 376.240625 277.314375 \r\nL 376.240625 0 \r\nL 0 0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n  </g>\r\n  <g id=\"axes_1\">\r\n   <g id=\"patch_2\">\r\n    <path d=\"M 34.240625 239.758125 \r\nL 369.040625 239.758125 \r\nL 369.040625 22.318125 \r\nL 34.240625 22.318125 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n   </g>\r\n   <g id=\"matplotlib.axis_1\">\r\n    <g id=\"xtick_1\">\r\n     <g id=\"line2d_1\">\r\n      <defs>\r\n       <path d=\"M 0 0 \r\nL 0 3.5 \r\n\" id=\"m0d1292c5de\" style=\"stroke:#000000;stroke-width:0.8;\"/>\r\n      </defs>\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"38.963509\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_1\">\r\n      <!-- 0 -->\r\n      <defs>\r\n       <path d=\"M 31.78125 66.40625 \r\nQ 24.171875 66.40625 20.328125 58.90625 \r\nQ 16.5 51.421875 16.5 36.375 \r\nQ 16.5 21.390625 20.328125 13.890625 \r\nQ 24.171875 6.390625 31.78125 6.390625 \r\nQ 39.453125 6.390625 43.28125 13.890625 \r\nQ 47.125 21.390625 47.125 36.375 \r\nQ 47.125 51.421875 43.28125 58.90625 \r\nQ 39.453125 66.40625 31.78125 66.40625 \r\nz\r\nM 31.78125 74.21875 \r\nQ 44.046875 74.21875 50.515625 64.515625 \r\nQ 56.984375 54.828125 56.984375 36.375 \r\nQ 56.984375 17.96875 50.515625 8.265625 \r\nQ 44.046875 -1.421875 31.78125 -1.421875 \r\nQ 19.53125 -1.421875 13.0625 8.265625 \r\nQ 6.59375 17.96875 6.59375 36.375 \r\nQ 6.59375 54.828125 13.0625 64.515625 \r\nQ 19.53125 74.21875 31.78125 74.21875 \r\nz\r\n\" id=\"DejaVuSans-48\"/>\r\n      </defs>\r\n      <g transform=\"translate(35.782259 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_2\">\r\n     <g id=\"line2d_2\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"91.439998\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_2\">\r\n      <!-- 5 -->\r\n      <defs>\r\n       <path d=\"M 10.796875 72.90625 \r\nL 49.515625 72.90625 \r\nL 49.515625 64.59375 \r\nL 19.828125 64.59375 \r\nL 19.828125 46.734375 \r\nQ 21.96875 47.46875 24.109375 47.828125 \r\nQ 26.265625 48.1875 28.421875 48.1875 \r\nQ 40.625 48.1875 47.75 41.5 \r\nQ 54.890625 34.8125 54.890625 23.390625 \r\nQ 54.890625 11.625 47.5625 5.09375 \r\nQ 40.234375 -1.421875 26.90625 -1.421875 \r\nQ 22.3125 -1.421875 17.546875 -0.640625 \r\nQ 12.796875 0.140625 7.71875 1.703125 \r\nL 7.71875 11.625 \r\nQ 12.109375 9.234375 16.796875 8.0625 \r\nQ 21.484375 6.890625 26.703125 6.890625 \r\nQ 35.15625 6.890625 40.078125 11.328125 \r\nQ 45.015625 15.765625 45.015625 23.390625 \r\nQ 45.015625 31 40.078125 35.4375 \r\nQ 35.15625 39.890625 26.703125 39.890625 \r\nQ 22.75 39.890625 18.8125 39.015625 \r\nQ 14.890625 38.140625 10.796875 36.28125 \r\nz\r\n\" id=\"DejaVuSans-53\"/>\r\n      </defs>\r\n      <g transform=\"translate(88.258748 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_3\">\r\n     <g id=\"line2d_3\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"143.916487\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_3\">\r\n      <!-- 10 -->\r\n      <defs>\r\n       <path d=\"M 12.40625 8.296875 \r\nL 28.515625 8.296875 \r\nL 28.515625 63.921875 \r\nL 10.984375 60.40625 \r\nL 10.984375 69.390625 \r\nL 28.421875 72.90625 \r\nL 38.28125 72.90625 \r\nL 38.28125 8.296875 \r\nL 54.390625 8.296875 \r\nL 54.390625 0 \r\nL 12.40625 0 \r\nz\r\n\" id=\"DejaVuSans-49\"/>\r\n      </defs>\r\n      <g transform=\"translate(137.553987 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-49\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_4\">\r\n     <g id=\"line2d_4\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"196.392976\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_4\">\r\n      <!-- 15 -->\r\n      <g transform=\"translate(190.030476 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-49\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_5\">\r\n     <g id=\"line2d_5\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"248.869465\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_5\">\r\n      <!-- 20 -->\r\n      <defs>\r\n       <path d=\"M 19.1875 8.296875 \r\nL 53.609375 8.296875 \r\nL 53.609375 0 \r\nL 7.328125 0 \r\nL 7.328125 8.296875 \r\nQ 12.9375 14.109375 22.625 23.890625 \r\nQ 32.328125 33.6875 34.8125 36.53125 \r\nQ 39.546875 41.84375 41.421875 45.53125 \r\nQ 43.3125 49.21875 43.3125 52.78125 \r\nQ 43.3125 58.59375 39.234375 62.25 \r\nQ 35.15625 65.921875 28.609375 65.921875 \r\nQ 23.96875 65.921875 18.8125 64.3125 \r\nQ 13.671875 62.703125 7.8125 59.421875 \r\nL 7.8125 69.390625 \r\nQ 13.765625 71.78125 18.9375 73 \r\nQ 24.125 74.21875 28.421875 74.21875 \r\nQ 39.75 74.21875 46.484375 68.546875 \r\nQ 53.21875 62.890625 53.21875 53.421875 \r\nQ 53.21875 48.921875 51.53125 44.890625 \r\nQ 49.859375 40.875 45.40625 35.40625 \r\nQ 44.1875 33.984375 37.640625 27.21875 \r\nQ 31.109375 20.453125 19.1875 8.296875 \r\nz\r\n\" id=\"DejaVuSans-50\"/>\r\n      </defs>\r\n      <g transform=\"translate(242.506965 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-50\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_6\">\r\n     <g id=\"line2d_6\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"301.345954\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_6\">\r\n      <!-- 25 -->\r\n      <g transform=\"translate(294.983454 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-50\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_7\">\r\n     <g id=\"line2d_7\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"353.822443\" xlink:href=\"#m0d1292c5de\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_7\">\r\n      <!-- 30 -->\r\n      <defs>\r\n       <path d=\"M 40.578125 39.3125 \r\nQ 47.65625 37.796875 51.625 33 \r\nQ 55.609375 28.21875 55.609375 21.1875 \r\nQ 55.609375 10.40625 48.1875 4.484375 \r\nQ 40.765625 -1.421875 27.09375 -1.421875 \r\nQ 22.515625 -1.421875 17.65625 -0.515625 \r\nQ 12.796875 0.390625 7.625 2.203125 \r\nL 7.625 11.71875 \r\nQ 11.71875 9.328125 16.59375 8.109375 \r\nQ 21.484375 6.890625 26.8125 6.890625 \r\nQ 36.078125 6.890625 40.9375 10.546875 \r\nQ 45.796875 14.203125 45.796875 21.1875 \r\nQ 45.796875 27.640625 41.28125 31.265625 \r\nQ 36.765625 34.90625 28.71875 34.90625 \r\nL 20.21875 34.90625 \r\nL 20.21875 43.015625 \r\nL 29.109375 43.015625 \r\nQ 36.375 43.015625 40.234375 45.921875 \r\nQ 44.09375 48.828125 44.09375 54.296875 \r\nQ 44.09375 59.90625 40.109375 62.90625 \r\nQ 36.140625 65.921875 28.71875 65.921875 \r\nQ 24.65625 65.921875 20.015625 65.03125 \r\nQ 15.375 64.15625 9.8125 62.3125 \r\nL 9.8125 71.09375 \r\nQ 15.4375 72.65625 20.34375 73.4375 \r\nQ 25.25 74.21875 29.59375 74.21875 \r\nQ 40.828125 74.21875 47.359375 69.109375 \r\nQ 53.90625 64.015625 53.90625 55.328125 \r\nQ 53.90625 49.265625 50.4375 45.09375 \r\nQ 46.96875 40.921875 40.578125 39.3125 \r\nz\r\n\" id=\"DejaVuSans-51\"/>\r\n      </defs>\r\n      <g transform=\"translate(347.459943 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-51\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_8\">\r\n     <!-- Epochs -->\r\n     <defs>\r\n      <path d=\"M 9.8125 72.90625 \r\nL 55.90625 72.90625 \r\nL 55.90625 64.59375 \r\nL 19.671875 64.59375 \r\nL 19.671875 43.015625 \r\nL 54.390625 43.015625 \r\nL 54.390625 34.71875 \r\nL 19.671875 34.71875 \r\nL 19.671875 8.296875 \r\nL 56.78125 8.296875 \r\nL 56.78125 0 \r\nL 9.8125 0 \r\nz\r\n\" id=\"DejaVuSans-69\"/>\r\n      <path d=\"M 18.109375 8.203125 \r\nL 18.109375 -20.796875 \r\nL 9.078125 -20.796875 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.390625 \r\nQ 20.953125 51.265625 25.265625 53.625 \r\nQ 29.59375 56 35.59375 56 \r\nQ 45.5625 56 51.78125 48.09375 \r\nQ 58.015625 40.1875 58.015625 27.296875 \r\nQ 58.015625 14.40625 51.78125 6.484375 \r\nQ 45.5625 -1.421875 35.59375 -1.421875 \r\nQ 29.59375 -1.421875 25.265625 0.953125 \r\nQ 20.953125 3.328125 18.109375 8.203125 \r\nz\r\nM 48.6875 27.296875 \r\nQ 48.6875 37.203125 44.609375 42.84375 \r\nQ 40.53125 48.484375 33.40625 48.484375 \r\nQ 26.265625 48.484375 22.1875 42.84375 \r\nQ 18.109375 37.203125 18.109375 27.296875 \r\nQ 18.109375 17.390625 22.1875 11.75 \r\nQ 26.265625 6.109375 33.40625 6.109375 \r\nQ 40.53125 6.109375 44.609375 11.75 \r\nQ 48.6875 17.390625 48.6875 27.296875 \r\nz\r\n\" id=\"DejaVuSans-112\"/>\r\n      <path d=\"M 30.609375 48.390625 \r\nQ 23.390625 48.390625 19.1875 42.75 \r\nQ 14.984375 37.109375 14.984375 27.296875 \r\nQ 14.984375 17.484375 19.15625 11.84375 \r\nQ 23.34375 6.203125 30.609375 6.203125 \r\nQ 37.796875 6.203125 41.984375 11.859375 \r\nQ 46.1875 17.53125 46.1875 27.296875 \r\nQ 46.1875 37.015625 41.984375 42.703125 \r\nQ 37.796875 48.390625 30.609375 48.390625 \r\nz\r\nM 30.609375 56 \r\nQ 42.328125 56 49.015625 48.375 \r\nQ 55.71875 40.765625 55.71875 27.296875 \r\nQ 55.71875 13.875 49.015625 6.21875 \r\nQ 42.328125 -1.421875 30.609375 -1.421875 \r\nQ 18.84375 -1.421875 12.171875 6.21875 \r\nQ 5.515625 13.875 5.515625 27.296875 \r\nQ 5.515625 40.765625 12.171875 48.375 \r\nQ 18.84375 56 30.609375 56 \r\nz\r\n\" id=\"DejaVuSans-111\"/>\r\n      <path d=\"M 48.78125 52.59375 \r\nL 48.78125 44.1875 \r\nQ 44.96875 46.296875 41.140625 47.34375 \r\nQ 37.3125 48.390625 33.40625 48.390625 \r\nQ 24.65625 48.390625 19.8125 42.84375 \r\nQ 14.984375 37.3125 14.984375 27.296875 \r\nQ 14.984375 17.28125 19.8125 11.734375 \r\nQ 24.65625 6.203125 33.40625 6.203125 \r\nQ 37.3125 6.203125 41.140625 7.25 \r\nQ 44.96875 8.296875 48.78125 10.40625 \r\nL 48.78125 2.09375 \r\nQ 45.015625 0.34375 40.984375 -0.53125 \r\nQ 36.96875 -1.421875 32.421875 -1.421875 \r\nQ 20.0625 -1.421875 12.78125 6.34375 \r\nQ 5.515625 14.109375 5.515625 27.296875 \r\nQ 5.515625 40.671875 12.859375 48.328125 \r\nQ 20.21875 56 33.015625 56 \r\nQ 37.15625 56 41.109375 55.140625 \r\nQ 45.0625 54.296875 48.78125 52.59375 \r\nz\r\n\" id=\"DejaVuSans-99\"/>\r\n      <path d=\"M 54.890625 33.015625 \r\nL 54.890625 0 \r\nL 45.90625 0 \r\nL 45.90625 32.71875 \r\nQ 45.90625 40.484375 42.875 44.328125 \r\nQ 39.84375 48.1875 33.796875 48.1875 \r\nQ 26.515625 48.1875 22.3125 43.546875 \r\nQ 18.109375 38.921875 18.109375 30.90625 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 75.984375 \r\nL 18.109375 75.984375 \r\nL 18.109375 46.1875 \r\nQ 21.34375 51.125 25.703125 53.5625 \r\nQ 30.078125 56 35.796875 56 \r\nQ 45.21875 56 50.046875 50.171875 \r\nQ 54.890625 44.34375 54.890625 33.015625 \r\nz\r\n\" id=\"DejaVuSans-104\"/>\r\n      <path d=\"M 44.28125 53.078125 \r\nL 44.28125 44.578125 \r\nQ 40.484375 46.53125 36.375 47.5 \r\nQ 32.28125 48.484375 27.875 48.484375 \r\nQ 21.1875 48.484375 17.84375 46.4375 \r\nQ 14.5 44.390625 14.5 40.28125 \r\nQ 14.5 37.15625 16.890625 35.375 \r\nQ 19.28125 33.59375 26.515625 31.984375 \r\nL 29.59375 31.296875 \r\nQ 39.15625 29.25 43.1875 25.515625 \r\nQ 47.21875 21.78125 47.21875 15.09375 \r\nQ 47.21875 7.46875 41.1875 3.015625 \r\nQ 35.15625 -1.421875 24.609375 -1.421875 \r\nQ 20.21875 -1.421875 15.453125 -0.5625 \r\nQ 10.6875 0.296875 5.421875 2 \r\nL 5.421875 11.28125 \r\nQ 10.40625 8.6875 15.234375 7.390625 \r\nQ 20.0625 6.109375 24.8125 6.109375 \r\nQ 31.15625 6.109375 34.5625 8.28125 \r\nQ 37.984375 10.453125 37.984375 14.40625 \r\nQ 37.984375 18.0625 35.515625 20.015625 \r\nQ 33.0625 21.96875 24.703125 23.78125 \r\nL 21.578125 24.515625 \r\nQ 13.234375 26.265625 9.515625 29.90625 \r\nQ 5.8125 33.546875 5.8125 39.890625 \r\nQ 5.8125 47.609375 11.28125 51.796875 \r\nQ 16.75 56 26.8125 56 \r\nQ 31.78125 56 36.171875 55.265625 \r\nQ 40.578125 54.546875 44.28125 53.078125 \r\nz\r\n\" id=\"DejaVuSans-115\"/>\r\n     </defs>\r\n     <g transform=\"translate(183.725 268.034687)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-69\"/>\r\n      <use x=\"63.183594\" xlink:href=\"#DejaVuSans-112\"/>\r\n      <use x=\"126.660156\" xlink:href=\"#DejaVuSans-111\"/>\r\n      <use x=\"187.841797\" xlink:href=\"#DejaVuSans-99\"/>\r\n      <use x=\"242.822266\" xlink:href=\"#DejaVuSans-104\"/>\r\n      <use x=\"306.201172\" xlink:href=\"#DejaVuSans-115\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n   <g id=\"matplotlib.axis_2\">\r\n    <g id=\"ytick_1\">\r\n     <g id=\"line2d_8\">\r\n      <defs>\r\n       <path d=\"M 0 0 \r\nL -3.5 0 \r\n\" id=\"m6fac969159\" style=\"stroke:#000000;stroke-width:0.8;\"/>\r\n      </defs>\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"214.558333\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_9\">\r\n      <!-- 1 -->\r\n      <g transform=\"translate(20.878125 218.357552)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-49\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_2\">\r\n     <g id=\"line2d_9\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"181.186469\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_10\">\r\n      <!-- 2 -->\r\n      <g transform=\"translate(20.878125 184.985688)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-50\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_3\">\r\n     <g id=\"line2d_10\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"147.814605\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_11\">\r\n      <!-- 3 -->\r\n      <g transform=\"translate(20.878125 151.613823)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-51\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_4\">\r\n     <g id=\"line2d_11\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"114.442741\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_12\">\r\n      <!-- 4 -->\r\n      <defs>\r\n       <path d=\"M 37.796875 64.3125 \r\nL 12.890625 25.390625 \r\nL 37.796875 25.390625 \r\nz\r\nM 35.203125 72.90625 \r\nL 47.609375 72.90625 \r\nL 47.609375 25.390625 \r\nL 58.015625 25.390625 \r\nL 58.015625 17.1875 \r\nL 47.609375 17.1875 \r\nL 47.609375 0 \r\nL 37.796875 0 \r\nL 37.796875 17.1875 \r\nL 4.890625 17.1875 \r\nL 4.890625 26.703125 \r\nz\r\n\" id=\"DejaVuSans-52\"/>\r\n      </defs>\r\n      <g transform=\"translate(20.878125 118.241959)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-52\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_5\">\r\n     <g id=\"line2d_12\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"81.070876\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_13\">\r\n      <!-- 5 -->\r\n      <g transform=\"translate(20.878125 84.870095)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_6\">\r\n     <g id=\"line2d_13\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"34.240625\" xlink:href=\"#m6fac969159\" y=\"47.699012\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_14\">\r\n      <!-- 6 -->\r\n      <defs>\r\n       <path d=\"M 33.015625 40.375 \r\nQ 26.375 40.375 22.484375 35.828125 \r\nQ 18.609375 31.296875 18.609375 23.390625 \r\nQ 18.609375 15.53125 22.484375 10.953125 \r\nQ 26.375 6.390625 33.015625 6.390625 \r\nQ 39.65625 6.390625 43.53125 10.953125 \r\nQ 47.40625 15.53125 47.40625 23.390625 \r\nQ 47.40625 31.296875 43.53125 35.828125 \r\nQ 39.65625 40.375 33.015625 40.375 \r\nz\r\nM 52.59375 71.296875 \r\nL 52.59375 62.3125 \r\nQ 48.875 64.0625 45.09375 64.984375 \r\nQ 41.3125 65.921875 37.59375 65.921875 \r\nQ 27.828125 65.921875 22.671875 59.328125 \r\nQ 17.53125 52.734375 16.796875 39.40625 \r\nQ 19.671875 43.65625 24.015625 45.921875 \r\nQ 28.375 48.1875 33.59375 48.1875 \r\nQ 44.578125 48.1875 50.953125 41.515625 \r\nQ 57.328125 34.859375 57.328125 23.390625 \r\nQ 57.328125 12.15625 50.6875 5.359375 \r\nQ 44.046875 -1.421875 33.015625 -1.421875 \r\nQ 20.359375 -1.421875 13.671875 8.265625 \r\nQ 6.984375 17.96875 6.984375 36.375 \r\nQ 6.984375 53.65625 15.1875 63.9375 \r\nQ 23.390625 74.21875 37.203125 74.21875 \r\nQ 40.921875 74.21875 44.703125 73.484375 \r\nQ 48.484375 72.75 52.59375 71.296875 \r\nz\r\n\" id=\"DejaVuSans-54\"/>\r\n      </defs>\r\n      <g transform=\"translate(20.878125 51.498231)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-54\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_15\">\r\n     <!-- loss -->\r\n     <defs>\r\n      <path d=\"M 9.421875 75.984375 \r\nL 18.40625 75.984375 \r\nL 18.40625 0 \r\nL 9.421875 0 \r\nz\r\n\" id=\"DejaVuSans-108\"/>\r\n     </defs>\r\n     <g transform=\"translate(14.798437 140.695937)rotate(-90)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-108\"/>\r\n      <use x=\"27.783203\" xlink:href=\"#DejaVuSans-111\"/>\r\n      <use x=\"88.964844\" xlink:href=\"#DejaVuSans-115\"/>\r\n      <use x=\"141.064453\" xlink:href=\"#DejaVuSans-115\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n   <g id=\"line2d_14\">\r\n    <path clip-path=\"url(#pe191d8c20f)\" d=\"M 49.458807 32.201761 \r\nL 59.954105 68.955222 \r\nL 70.449402 104.87634 \r\nL 80.9447 137.194154 \r\nL 91.439998 167.698219 \r\nL 101.935296 197.939657 \r\nL 112.430594 221.777272 \r\nL 122.925891 225.394615 \r\nL 133.421189 224.641692 \r\nL 143.916487 226.347631 \r\nL 154.411785 227.202562 \r\nL 164.907083 227.44421 \r\nL 175.40238 227.691817 \r\nL 185.897678 227.872105 \r\nL 196.392976 228.063737 \r\nL 206.888274 228.209243 \r\nL 217.383572 228.366288 \r\nL 227.87887 228.498425 \r\nL 238.374167 228.569971 \r\nL 248.869465 228.744272 \r\nL 259.364763 228.893086 \r\nL 269.860061 228.910958 \r\nL 280.355359 228.975905 \r\nL 290.850656 229.247568 \r\nL 301.345954 229.316835 \r\nL 311.841252 229.454759 \r\nL 322.33655 229.536199 \r\nL 332.831848 229.610666 \r\nL 343.327145 229.754242 \r\nL 353.822443 229.874489 \r\n\" style=\"fill:none;stroke:#0000ff;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    <defs>\r\n     <path d=\"M 0 3 \r\nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \r\nC 2.683901 1.55874 3 0.795609 3 0 \r\nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \r\nC 1.55874 -2.683901 0.795609 -3 0 -3 \r\nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \r\nC -2.683901 -1.55874 -3 -0.795609 -3 0 \r\nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \r\nC -1.55874 2.683901 -0.795609 3 0 3 \r\nz\r\n\" id=\"m126aaaf1a8\" style=\"stroke:#0000ff;\"/>\r\n    </defs>\r\n    <g clip-path=\"url(#pe191d8c20f)\">\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"49.458807\" xlink:href=\"#m126aaaf1a8\" y=\"32.201761\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"59.954105\" xlink:href=\"#m126aaaf1a8\" y=\"68.955222\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"70.449402\" xlink:href=\"#m126aaaf1a8\" y=\"104.87634\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"80.9447\" xlink:href=\"#m126aaaf1a8\" y=\"137.194154\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"91.439998\" xlink:href=\"#m126aaaf1a8\" y=\"167.698219\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"101.935296\" xlink:href=\"#m126aaaf1a8\" y=\"197.939657\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"112.430594\" xlink:href=\"#m126aaaf1a8\" y=\"221.777272\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"122.925891\" xlink:href=\"#m126aaaf1a8\" y=\"225.394615\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"133.421189\" xlink:href=\"#m126aaaf1a8\" y=\"224.641692\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"143.916487\" xlink:href=\"#m126aaaf1a8\" y=\"226.347631\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"154.411785\" xlink:href=\"#m126aaaf1a8\" y=\"227.202562\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"164.907083\" xlink:href=\"#m126aaaf1a8\" y=\"227.44421\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"175.40238\" xlink:href=\"#m126aaaf1a8\" y=\"227.691817\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"185.897678\" xlink:href=\"#m126aaaf1a8\" y=\"227.872105\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"196.392976\" xlink:href=\"#m126aaaf1a8\" y=\"228.063737\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"206.888274\" xlink:href=\"#m126aaaf1a8\" y=\"228.209243\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"217.383572\" xlink:href=\"#m126aaaf1a8\" y=\"228.366288\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"227.87887\" xlink:href=\"#m126aaaf1a8\" y=\"228.498425\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"238.374167\" xlink:href=\"#m126aaaf1a8\" y=\"228.569971\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"248.869465\" xlink:href=\"#m126aaaf1a8\" y=\"228.744272\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"259.364763\" xlink:href=\"#m126aaaf1a8\" y=\"228.893086\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"269.860061\" xlink:href=\"#m126aaaf1a8\" y=\"228.910958\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"280.355359\" xlink:href=\"#m126aaaf1a8\" y=\"228.975905\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"290.850656\" xlink:href=\"#m126aaaf1a8\" y=\"229.247568\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"301.345954\" xlink:href=\"#m126aaaf1a8\" y=\"229.316835\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"311.841252\" xlink:href=\"#m126aaaf1a8\" y=\"229.454759\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"322.33655\" xlink:href=\"#m126aaaf1a8\" y=\"229.536199\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"332.831848\" xlink:href=\"#m126aaaf1a8\" y=\"229.610666\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"343.327145\" xlink:href=\"#m126aaaf1a8\" y=\"229.754242\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"353.822443\" xlink:href=\"#m126aaaf1a8\" y=\"229.874489\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"line2d_15\">\r\n    <path clip-path=\"url(#pe191d8c20f)\" d=\"M 49.458807 35.566013 \r\nL 59.954105 75.044867 \r\nL 70.449402 111.855343 \r\nL 80.9447 147.372273 \r\nL 91.439998 181.353742 \r\nL 101.935296 210.752179 \r\nL 112.430594 225.231225 \r\nL 122.925891 222.976951 \r\nL 133.421189 224.482944 \r\nL 143.916487 226.100075 \r\nL 154.411785 226.198113 \r\nL 164.907083 226.569738 \r\nL 175.40238 226.701147 \r\nL 185.897678 226.776169 \r\nL 196.392976 226.908789 \r\nL 206.888274 227.008358 \r\nL 217.383572 227.128046 \r\nL 227.87887 227.252913 \r\nL 238.374167 227.338128 \r\nL 248.869465 227.469458 \r\nL 259.364763 227.592475 \r\nL 269.860061 227.630869 \r\nL 280.355359 227.903167 \r\nL 290.850656 227.896913 \r\nL 301.345954 227.970757 \r\nL 311.841252 228.151254 \r\nL 322.33655 228.278717 \r\nL 332.831848 228.247442 \r\nL 343.327145 228.406211 \r\nL 353.822443 228.461604 \r\n\" style=\"fill:none;stroke:#ff0000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    <defs>\r\n     <path d=\"M 0 3 \r\nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \r\nC 2.683901 1.55874 3 0.795609 3 0 \r\nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \r\nC 1.55874 -2.683901 0.795609 -3 0 -3 \r\nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \r\nC -2.683901 -1.55874 -3 -0.795609 -3 0 \r\nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \r\nC -1.55874 2.683901 -0.795609 3 0 3 \r\nz\r\n\" id=\"mf605d5f176\" style=\"stroke:#ff0000;\"/>\r\n    </defs>\r\n    <g clip-path=\"url(#pe191d8c20f)\">\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"49.458807\" xlink:href=\"#mf605d5f176\" y=\"35.566013\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"59.954105\" xlink:href=\"#mf605d5f176\" y=\"75.044867\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"70.449402\" xlink:href=\"#mf605d5f176\" y=\"111.855343\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"80.9447\" xlink:href=\"#mf605d5f176\" y=\"147.372273\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"91.439998\" xlink:href=\"#mf605d5f176\" y=\"181.353742\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"101.935296\" xlink:href=\"#mf605d5f176\" y=\"210.752179\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"112.430594\" xlink:href=\"#mf605d5f176\" y=\"225.231225\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"122.925891\" xlink:href=\"#mf605d5f176\" y=\"222.976951\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"133.421189\" xlink:href=\"#mf605d5f176\" y=\"224.482944\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"143.916487\" xlink:href=\"#mf605d5f176\" y=\"226.100075\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"154.411785\" xlink:href=\"#mf605d5f176\" y=\"226.198113\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"164.907083\" xlink:href=\"#mf605d5f176\" y=\"226.569738\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"175.40238\" xlink:href=\"#mf605d5f176\" y=\"226.701147\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"185.897678\" xlink:href=\"#mf605d5f176\" y=\"226.776169\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"196.392976\" xlink:href=\"#mf605d5f176\" y=\"226.908789\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"206.888274\" xlink:href=\"#mf605d5f176\" y=\"227.008358\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"217.383572\" xlink:href=\"#mf605d5f176\" y=\"227.128046\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"227.87887\" xlink:href=\"#mf605d5f176\" y=\"227.252913\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"238.374167\" xlink:href=\"#mf605d5f176\" y=\"227.338128\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"248.869465\" xlink:href=\"#mf605d5f176\" y=\"227.469458\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"259.364763\" xlink:href=\"#mf605d5f176\" y=\"227.592475\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"269.860061\" xlink:href=\"#mf605d5f176\" y=\"227.630869\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"280.355359\" xlink:href=\"#mf605d5f176\" y=\"227.903167\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"290.850656\" xlink:href=\"#mf605d5f176\" y=\"227.896913\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"301.345954\" xlink:href=\"#mf605d5f176\" y=\"227.970757\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"311.841252\" xlink:href=\"#mf605d5f176\" y=\"228.151254\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"322.33655\" xlink:href=\"#mf605d5f176\" y=\"228.278717\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"332.831848\" xlink:href=\"#mf605d5f176\" y=\"228.247442\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"343.327145\" xlink:href=\"#mf605d5f176\" y=\"228.406211\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"353.822443\" xlink:href=\"#mf605d5f176\" y=\"228.461604\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"patch_3\">\r\n    <path d=\"M 34.240625 239.758125 \r\nL 34.240625 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_4\">\r\n    <path d=\"M 369.040625 239.758125 \r\nL 369.040625 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_5\">\r\n    <path d=\"M 34.240625 239.758125 \r\nL 369.040625 239.758125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_6\">\r\n    <path d=\"M 34.240625 22.318125 \r\nL 369.040625 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"text_16\">\r\n    <!-- Training and validation loss -->\r\n    <defs>\r\n     <path d=\"M -0.296875 72.90625 \r\nL 61.375 72.90625 \r\nL 61.375 64.59375 \r\nL 35.5 64.59375 \r\nL 35.5 0 \r\nL 25.59375 0 \r\nL 25.59375 64.59375 \r\nL -0.296875 64.59375 \r\nz\r\n\" id=\"DejaVuSans-84\"/>\r\n     <path d=\"M 41.109375 46.296875 \r\nQ 39.59375 47.171875 37.8125 47.578125 \r\nQ 36.03125 48 33.890625 48 \r\nQ 26.265625 48 22.1875 43.046875 \r\nQ 18.109375 38.09375 18.109375 28.8125 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.1875 \r\nQ 20.953125 51.171875 25.484375 53.578125 \r\nQ 30.03125 56 36.53125 56 \r\nQ 37.453125 56 38.578125 55.875 \r\nQ 39.703125 55.765625 41.0625 55.515625 \r\nz\r\n\" id=\"DejaVuSans-114\"/>\r\n     <path d=\"M 34.28125 27.484375 \r\nQ 23.390625 27.484375 19.1875 25 \r\nQ 14.984375 22.515625 14.984375 16.5 \r\nQ 14.984375 11.71875 18.140625 8.90625 \r\nQ 21.296875 6.109375 26.703125 6.109375 \r\nQ 34.1875 6.109375 38.703125 11.40625 \r\nQ 43.21875 16.703125 43.21875 25.484375 \r\nL 43.21875 27.484375 \r\nz\r\nM 52.203125 31.203125 \r\nL 52.203125 0 \r\nL 43.21875 0 \r\nL 43.21875 8.296875 \r\nQ 40.140625 3.328125 35.546875 0.953125 \r\nQ 30.953125 -1.421875 24.3125 -1.421875 \r\nQ 15.921875 -1.421875 10.953125 3.296875 \r\nQ 6 8.015625 6 15.921875 \r\nQ 6 25.140625 12.171875 29.828125 \r\nQ 18.359375 34.515625 30.609375 34.515625 \r\nL 43.21875 34.515625 \r\nL 43.21875 35.40625 \r\nQ 43.21875 41.609375 39.140625 45 \r\nQ 35.0625 48.390625 27.6875 48.390625 \r\nQ 23 48.390625 18.546875 47.265625 \r\nQ 14.109375 46.140625 10.015625 43.890625 \r\nL 10.015625 52.203125 \r\nQ 14.9375 54.109375 19.578125 55.046875 \r\nQ 24.21875 56 28.609375 56 \r\nQ 40.484375 56 46.34375 49.84375 \r\nQ 52.203125 43.703125 52.203125 31.203125 \r\nz\r\n\" id=\"DejaVuSans-97\"/>\r\n     <path d=\"M 9.421875 54.6875 \r\nL 18.40625 54.6875 \r\nL 18.40625 0 \r\nL 9.421875 0 \r\nz\r\nM 9.421875 75.984375 \r\nL 18.40625 75.984375 \r\nL 18.40625 64.59375 \r\nL 9.421875 64.59375 \r\nz\r\n\" id=\"DejaVuSans-105\"/>\r\n     <path d=\"M 54.890625 33.015625 \r\nL 54.890625 0 \r\nL 45.90625 0 \r\nL 45.90625 32.71875 \r\nQ 45.90625 40.484375 42.875 44.328125 \r\nQ 39.84375 48.1875 33.796875 48.1875 \r\nQ 26.515625 48.1875 22.3125 43.546875 \r\nQ 18.109375 38.921875 18.109375 30.90625 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.1875 \r\nQ 21.34375 51.125 25.703125 53.5625 \r\nQ 30.078125 56 35.796875 56 \r\nQ 45.21875 56 50.046875 50.171875 \r\nQ 54.890625 44.34375 54.890625 33.015625 \r\nz\r\n\" id=\"DejaVuSans-110\"/>\r\n     <path d=\"M 45.40625 27.984375 \r\nQ 45.40625 37.75 41.375 43.109375 \r\nQ 37.359375 48.484375 30.078125 48.484375 \r\nQ 22.859375 48.484375 18.828125 43.109375 \r\nQ 14.796875 37.75 14.796875 27.984375 \r\nQ 14.796875 18.265625 18.828125 12.890625 \r\nQ 22.859375 7.515625 30.078125 7.515625 \r\nQ 37.359375 7.515625 41.375 12.890625 \r\nQ 45.40625 18.265625 45.40625 27.984375 \r\nz\r\nM 54.390625 6.78125 \r\nQ 54.390625 -7.171875 48.1875 -13.984375 \r\nQ 42 -20.796875 29.203125 -20.796875 \r\nQ 24.46875 -20.796875 20.265625 -20.09375 \r\nQ 16.0625 -19.390625 12.109375 -17.921875 \r\nL 12.109375 -9.1875 \r\nQ 16.0625 -11.328125 19.921875 -12.34375 \r\nQ 23.78125 -13.375 27.78125 -13.375 \r\nQ 36.625 -13.375 41.015625 -8.765625 \r\nQ 45.40625 -4.15625 45.40625 5.171875 \r\nL 45.40625 9.625 \r\nQ 42.625 4.78125 38.28125 2.390625 \r\nQ 33.9375 0 27.875 0 \r\nQ 17.828125 0 11.671875 7.65625 \r\nQ 5.515625 15.328125 5.515625 27.984375 \r\nQ 5.515625 40.671875 11.671875 48.328125 \r\nQ 17.828125 56 27.875 56 \r\nQ 33.9375 56 38.28125 53.609375 \r\nQ 42.625 51.21875 45.40625 46.390625 \r\nL 45.40625 54.6875 \r\nL 54.390625 54.6875 \r\nz\r\n\" id=\"DejaVuSans-103\"/>\r\n     <path id=\"DejaVuSans-32\"/>\r\n     <path d=\"M 45.40625 46.390625 \r\nL 45.40625 75.984375 \r\nL 54.390625 75.984375 \r\nL 54.390625 0 \r\nL 45.40625 0 \r\nL 45.40625 8.203125 \r\nQ 42.578125 3.328125 38.25 0.953125 \r\nQ 33.9375 -1.421875 27.875 -1.421875 \r\nQ 17.96875 -1.421875 11.734375 6.484375 \r\nQ 5.515625 14.40625 5.515625 27.296875 \r\nQ 5.515625 40.1875 11.734375 48.09375 \r\nQ 17.96875 56 27.875 56 \r\nQ 33.9375 56 38.25 53.625 \r\nQ 42.578125 51.265625 45.40625 46.390625 \r\nz\r\nM 14.796875 27.296875 \r\nQ 14.796875 17.390625 18.875 11.75 \r\nQ 22.953125 6.109375 30.078125 6.109375 \r\nQ 37.203125 6.109375 41.296875 11.75 \r\nQ 45.40625 17.390625 45.40625 27.296875 \r\nQ 45.40625 37.203125 41.296875 42.84375 \r\nQ 37.203125 48.484375 30.078125 48.484375 \r\nQ 22.953125 48.484375 18.875 42.84375 \r\nQ 14.796875 37.203125 14.796875 27.296875 \r\nz\r\n\" id=\"DejaVuSans-100\"/>\r\n     <path d=\"M 2.984375 54.6875 \r\nL 12.5 54.6875 \r\nL 29.59375 8.796875 \r\nL 46.6875 54.6875 \r\nL 56.203125 54.6875 \r\nL 35.6875 0 \r\nL 23.484375 0 \r\nz\r\n\" id=\"DejaVuSans-118\"/>\r\n     <path d=\"M 18.3125 70.21875 \r\nL 18.3125 54.6875 \r\nL 36.8125 54.6875 \r\nL 36.8125 47.703125 \r\nL 18.3125 47.703125 \r\nL 18.3125 18.015625 \r\nQ 18.3125 11.328125 20.140625 9.421875 \r\nQ 21.96875 7.515625 27.59375 7.515625 \r\nL 36.8125 7.515625 \r\nL 36.8125 0 \r\nL 27.59375 0 \r\nQ 17.1875 0 13.234375 3.875 \r\nQ 9.28125 7.765625 9.28125 18.015625 \r\nL 9.28125 47.703125 \r\nL 2.6875 47.703125 \r\nL 2.6875 54.6875 \r\nL 9.28125 54.6875 \r\nL 9.28125 70.21875 \r\nz\r\n\" id=\"DejaVuSans-116\"/>\r\n    </defs>\r\n    <g transform=\"translate(119.830625 16.318125)scale(0.12 -0.12)\">\r\n     <use xlink:href=\"#DejaVuSans-84\"/>\r\n     <use x=\"46.333984\" xlink:href=\"#DejaVuSans-114\"/>\r\n     <use x=\"87.447266\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"148.726562\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"176.509766\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"239.888672\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"267.671875\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"331.050781\" xlink:href=\"#DejaVuSans-103\"/>\r\n     <use x=\"394.527344\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"426.314453\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"487.59375\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"550.972656\" xlink:href=\"#DejaVuSans-100\"/>\r\n     <use x=\"614.449219\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"646.236328\" xlink:href=\"#DejaVuSans-118\"/>\r\n     <use x=\"705.416016\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"766.695312\" xlink:href=\"#DejaVuSans-108\"/>\r\n     <use x=\"794.478516\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"822.261719\" xlink:href=\"#DejaVuSans-100\"/>\r\n     <use x=\"885.738281\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"947.017578\" xlink:href=\"#DejaVuSans-116\"/>\r\n     <use x=\"986.226562\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"1014.009766\" xlink:href=\"#DejaVuSans-111\"/>\r\n     <use x=\"1075.191406\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"1138.570312\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"1170.357422\" xlink:href=\"#DejaVuSans-108\"/>\r\n     <use x=\"1198.140625\" xlink:href=\"#DejaVuSans-111\"/>\r\n     <use x=\"1259.322266\" xlink:href=\"#DejaVuSans-115\"/>\r\n     <use x=\"1311.421875\" xlink:href=\"#DejaVuSans-115\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"legend_1\">\r\n    <g id=\"patch_7\">\r\n     <path d=\"M 282.45 60.230625 \r\nL 362.040625 60.230625 \r\nQ 364.040625 60.230625 364.040625 58.230625 \r\nL 364.040625 29.318125 \r\nQ 364.040625 27.318125 362.040625 27.318125 \r\nL 282.45 27.318125 \r\nQ 280.45 27.318125 280.45 29.318125 \r\nL 280.45 58.230625 \r\nQ 280.45 60.230625 282.45 60.230625 \r\nz\r\n\" style=\"fill:#ffffff;opacity:0.8;stroke:#cccccc;stroke-linejoin:miter;\"/>\r\n    </g>\r\n    <g id=\"line2d_16\">\r\n     <path d=\"M 284.45 35.416562 \r\nL 304.45 35.416562 \r\n\" style=\"fill:none;stroke:#0000ff;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    </g>\r\n    <g id=\"line2d_17\">\r\n     <g>\r\n      <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"294.45\" xlink:href=\"#m126aaaf1a8\" y=\"35.416562\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_17\">\r\n     <!-- train_loss -->\r\n     <defs>\r\n      <path d=\"M 50.984375 -16.609375 \r\nL 50.984375 -23.578125 \r\nL -0.984375 -23.578125 \r\nL -0.984375 -16.609375 \r\nz\r\n\" id=\"DejaVuSans-95\"/>\r\n     </defs>\r\n     <g transform=\"translate(312.45 38.916562)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-116\"/>\r\n      <use x=\"39.208984\" xlink:href=\"#DejaVuSans-114\"/>\r\n      <use x=\"80.322266\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"141.601562\" xlink:href=\"#DejaVuSans-105\"/>\r\n      <use x=\"169.384766\" xlink:href=\"#DejaVuSans-110\"/>\r\n      <use x=\"232.763672\" xlink:href=\"#DejaVuSans-95\"/>\r\n      <use x=\"282.763672\" xlink:href=\"#DejaVuSans-108\"/>\r\n      <use x=\"310.546875\" xlink:href=\"#DejaVuSans-111\"/>\r\n      <use x=\"371.728516\" xlink:href=\"#DejaVuSans-115\"/>\r\n      <use x=\"423.828125\" xlink:href=\"#DejaVuSans-115\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"line2d_18\">\r\n     <path d=\"M 284.45 50.372812 \r\nL 304.45 50.372812 \r\n\" style=\"fill:none;stroke:#ff0000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    </g>\r\n    <g id=\"line2d_19\">\r\n     <g>\r\n      <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"294.45\" xlink:href=\"#mf605d5f176\" y=\"50.372812\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_18\">\r\n     <!-- val_loss -->\r\n     <g transform=\"translate(312.45 53.872812)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-118\"/>\r\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"120.458984\" xlink:href=\"#DejaVuSans-108\"/>\r\n      <use x=\"148.242188\" xlink:href=\"#DejaVuSans-95\"/>\r\n      <use x=\"198.242188\" xlink:href=\"#DejaVuSans-108\"/>\r\n      <use x=\"226.025391\" xlink:href=\"#DejaVuSans-111\"/>\r\n      <use x=\"287.207031\" xlink:href=\"#DejaVuSans-115\"/>\r\n      <use x=\"339.306641\" xlink:href=\"#DejaVuSans-115\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n  </g>\r\n </g>\r\n <defs>\r\n  <clipPath id=\"pe191d8c20f\">\r\n   <rect height=\"217.44\" width=\"334.8\" x=\"34.240625\" y=\"22.318125\"/>\r\n  </clipPath>\r\n </defs>\r\n</svg>\r\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_metric(history,'loss')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Created with matplotlib (https://matplotlib.org/) -->\r\n<svg height=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 392.14375 277.314375\" width=\"392.14375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <defs>\r\n  <style type=\"text/css\">\r\n*{stroke-linecap:butt;stroke-linejoin:round;}\r\n  </style>\r\n </defs>\r\n <g id=\"figure_1\">\r\n  <g id=\"patch_1\">\r\n   <path d=\"M 0 277.314375 \r\nL 392.14375 277.314375 \r\nL 392.14375 0 \r\nL 0 0 \r\nz\r\n\" style=\"fill:none;\"/>\r\n  </g>\r\n  <g id=\"axes_1\">\r\n   <g id=\"patch_2\">\r\n    <path d=\"M 50.14375 239.758125 \r\nL 384.94375 239.758125 \r\nL 384.94375 22.318125 \r\nL 50.14375 22.318125 \r\nz\r\n\" style=\"fill:#ffffff;\"/>\r\n   </g>\r\n   <g id=\"matplotlib.axis_1\">\r\n    <g id=\"xtick_1\">\r\n     <g id=\"line2d_1\">\r\n      <defs>\r\n       <path d=\"M 0 0 \r\nL 0 3.5 \r\n\" id=\"m059e8469e2\" style=\"stroke:#000000;stroke-width:0.8;\"/>\r\n      </defs>\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"54.866634\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_1\">\r\n      <!-- 0 -->\r\n      <defs>\r\n       <path d=\"M 31.78125 66.40625 \r\nQ 24.171875 66.40625 20.328125 58.90625 \r\nQ 16.5 51.421875 16.5 36.375 \r\nQ 16.5 21.390625 20.328125 13.890625 \r\nQ 24.171875 6.390625 31.78125 6.390625 \r\nQ 39.453125 6.390625 43.28125 13.890625 \r\nQ 47.125 21.390625 47.125 36.375 \r\nQ 47.125 51.421875 43.28125 58.90625 \r\nQ 39.453125 66.40625 31.78125 66.40625 \r\nz\r\nM 31.78125 74.21875 \r\nQ 44.046875 74.21875 50.515625 64.515625 \r\nQ 56.984375 54.828125 56.984375 36.375 \r\nQ 56.984375 17.96875 50.515625 8.265625 \r\nQ 44.046875 -1.421875 31.78125 -1.421875 \r\nQ 19.53125 -1.421875 13.0625 8.265625 \r\nQ 6.59375 17.96875 6.59375 36.375 \r\nQ 6.59375 54.828125 13.0625 64.515625 \r\nQ 19.53125 74.21875 31.78125 74.21875 \r\nz\r\n\" id=\"DejaVuSans-48\"/>\r\n      </defs>\r\n      <g transform=\"translate(51.685384 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_2\">\r\n     <g id=\"line2d_2\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"107.343123\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_2\">\r\n      <!-- 5 -->\r\n      <defs>\r\n       <path d=\"M 10.796875 72.90625 \r\nL 49.515625 72.90625 \r\nL 49.515625 64.59375 \r\nL 19.828125 64.59375 \r\nL 19.828125 46.734375 \r\nQ 21.96875 47.46875 24.109375 47.828125 \r\nQ 26.265625 48.1875 28.421875 48.1875 \r\nQ 40.625 48.1875 47.75 41.5 \r\nQ 54.890625 34.8125 54.890625 23.390625 \r\nQ 54.890625 11.625 47.5625 5.09375 \r\nQ 40.234375 -1.421875 26.90625 -1.421875 \r\nQ 22.3125 -1.421875 17.546875 -0.640625 \r\nQ 12.796875 0.140625 7.71875 1.703125 \r\nL 7.71875 11.625 \r\nQ 12.109375 9.234375 16.796875 8.0625 \r\nQ 21.484375 6.890625 26.703125 6.890625 \r\nQ 35.15625 6.890625 40.078125 11.328125 \r\nQ 45.015625 15.765625 45.015625 23.390625 \r\nQ 45.015625 31 40.078125 35.4375 \r\nQ 35.15625 39.890625 26.703125 39.890625 \r\nQ 22.75 39.890625 18.8125 39.015625 \r\nQ 14.890625 38.140625 10.796875 36.28125 \r\nz\r\n\" id=\"DejaVuSans-53\"/>\r\n      </defs>\r\n      <g transform=\"translate(104.161873 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_3\">\r\n     <g id=\"line2d_3\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"159.819612\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_3\">\r\n      <!-- 10 -->\r\n      <defs>\r\n       <path d=\"M 12.40625 8.296875 \r\nL 28.515625 8.296875 \r\nL 28.515625 63.921875 \r\nL 10.984375 60.40625 \r\nL 10.984375 69.390625 \r\nL 28.421875 72.90625 \r\nL 38.28125 72.90625 \r\nL 38.28125 8.296875 \r\nL 54.390625 8.296875 \r\nL 54.390625 0 \r\nL 12.40625 0 \r\nz\r\n\" id=\"DejaVuSans-49\"/>\r\n      </defs>\r\n      <g transform=\"translate(153.457112 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-49\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_4\">\r\n     <g id=\"line2d_4\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"212.296101\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_4\">\r\n      <!-- 15 -->\r\n      <g transform=\"translate(205.933601 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-49\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_5\">\r\n     <g id=\"line2d_5\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"264.77259\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_5\">\r\n      <!-- 20 -->\r\n      <defs>\r\n       <path d=\"M 19.1875 8.296875 \r\nL 53.609375 8.296875 \r\nL 53.609375 0 \r\nL 7.328125 0 \r\nL 7.328125 8.296875 \r\nQ 12.9375 14.109375 22.625 23.890625 \r\nQ 32.328125 33.6875 34.8125 36.53125 \r\nQ 39.546875 41.84375 41.421875 45.53125 \r\nQ 43.3125 49.21875 43.3125 52.78125 \r\nQ 43.3125 58.59375 39.234375 62.25 \r\nQ 35.15625 65.921875 28.609375 65.921875 \r\nQ 23.96875 65.921875 18.8125 64.3125 \r\nQ 13.671875 62.703125 7.8125 59.421875 \r\nL 7.8125 69.390625 \r\nQ 13.765625 71.78125 18.9375 73 \r\nQ 24.125 74.21875 28.421875 74.21875 \r\nQ 39.75 74.21875 46.484375 68.546875 \r\nQ 53.21875 62.890625 53.21875 53.421875 \r\nQ 53.21875 48.921875 51.53125 44.890625 \r\nQ 49.859375 40.875 45.40625 35.40625 \r\nQ 44.1875 33.984375 37.640625 27.21875 \r\nQ 31.109375 20.453125 19.1875 8.296875 \r\nz\r\n\" id=\"DejaVuSans-50\"/>\r\n      </defs>\r\n      <g transform=\"translate(258.41009 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-50\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_6\">\r\n     <g id=\"line2d_6\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"317.249079\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_6\">\r\n      <!-- 25 -->\r\n      <g transform=\"translate(310.886579 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-50\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"xtick_7\">\r\n     <g id=\"line2d_7\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"369.725568\" xlink:href=\"#m059e8469e2\" y=\"239.758125\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_7\">\r\n      <!-- 30 -->\r\n      <defs>\r\n       <path d=\"M 40.578125 39.3125 \r\nQ 47.65625 37.796875 51.625 33 \r\nQ 55.609375 28.21875 55.609375 21.1875 \r\nQ 55.609375 10.40625 48.1875 4.484375 \r\nQ 40.765625 -1.421875 27.09375 -1.421875 \r\nQ 22.515625 -1.421875 17.65625 -0.515625 \r\nQ 12.796875 0.390625 7.625 2.203125 \r\nL 7.625 11.71875 \r\nQ 11.71875 9.328125 16.59375 8.109375 \r\nQ 21.484375 6.890625 26.8125 6.890625 \r\nQ 36.078125 6.890625 40.9375 10.546875 \r\nQ 45.796875 14.203125 45.796875 21.1875 \r\nQ 45.796875 27.640625 41.28125 31.265625 \r\nQ 36.765625 34.90625 28.71875 34.90625 \r\nL 20.21875 34.90625 \r\nL 20.21875 43.015625 \r\nL 29.109375 43.015625 \r\nQ 36.375 43.015625 40.234375 45.921875 \r\nQ 44.09375 48.828125 44.09375 54.296875 \r\nQ 44.09375 59.90625 40.109375 62.90625 \r\nQ 36.140625 65.921875 28.71875 65.921875 \r\nQ 24.65625 65.921875 20.015625 65.03125 \r\nQ 15.375 64.15625 9.8125 62.3125 \r\nL 9.8125 71.09375 \r\nQ 15.4375 72.65625 20.34375 73.4375 \r\nQ 25.25 74.21875 29.59375 74.21875 \r\nQ 40.828125 74.21875 47.359375 69.109375 \r\nQ 53.90625 64.015625 53.90625 55.328125 \r\nQ 53.90625 49.265625 50.4375 45.09375 \r\nQ 46.96875 40.921875 40.578125 39.3125 \r\nz\r\n\" id=\"DejaVuSans-51\"/>\r\n      </defs>\r\n      <g transform=\"translate(363.363068 254.356562)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-51\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_8\">\r\n     <!-- Epochs -->\r\n     <defs>\r\n      <path d=\"M 9.8125 72.90625 \r\nL 55.90625 72.90625 \r\nL 55.90625 64.59375 \r\nL 19.671875 64.59375 \r\nL 19.671875 43.015625 \r\nL 54.390625 43.015625 \r\nL 54.390625 34.71875 \r\nL 19.671875 34.71875 \r\nL 19.671875 8.296875 \r\nL 56.78125 8.296875 \r\nL 56.78125 0 \r\nL 9.8125 0 \r\nz\r\n\" id=\"DejaVuSans-69\"/>\r\n      <path d=\"M 18.109375 8.203125 \r\nL 18.109375 -20.796875 \r\nL 9.078125 -20.796875 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.390625 \r\nQ 20.953125 51.265625 25.265625 53.625 \r\nQ 29.59375 56 35.59375 56 \r\nQ 45.5625 56 51.78125 48.09375 \r\nQ 58.015625 40.1875 58.015625 27.296875 \r\nQ 58.015625 14.40625 51.78125 6.484375 \r\nQ 45.5625 -1.421875 35.59375 -1.421875 \r\nQ 29.59375 -1.421875 25.265625 0.953125 \r\nQ 20.953125 3.328125 18.109375 8.203125 \r\nz\r\nM 48.6875 27.296875 \r\nQ 48.6875 37.203125 44.609375 42.84375 \r\nQ 40.53125 48.484375 33.40625 48.484375 \r\nQ 26.265625 48.484375 22.1875 42.84375 \r\nQ 18.109375 37.203125 18.109375 27.296875 \r\nQ 18.109375 17.390625 22.1875 11.75 \r\nQ 26.265625 6.109375 33.40625 6.109375 \r\nQ 40.53125 6.109375 44.609375 11.75 \r\nQ 48.6875 17.390625 48.6875 27.296875 \r\nz\r\n\" id=\"DejaVuSans-112\"/>\r\n      <path d=\"M 30.609375 48.390625 \r\nQ 23.390625 48.390625 19.1875 42.75 \r\nQ 14.984375 37.109375 14.984375 27.296875 \r\nQ 14.984375 17.484375 19.15625 11.84375 \r\nQ 23.34375 6.203125 30.609375 6.203125 \r\nQ 37.796875 6.203125 41.984375 11.859375 \r\nQ 46.1875 17.53125 46.1875 27.296875 \r\nQ 46.1875 37.015625 41.984375 42.703125 \r\nQ 37.796875 48.390625 30.609375 48.390625 \r\nz\r\nM 30.609375 56 \r\nQ 42.328125 56 49.015625 48.375 \r\nQ 55.71875 40.765625 55.71875 27.296875 \r\nQ 55.71875 13.875 49.015625 6.21875 \r\nQ 42.328125 -1.421875 30.609375 -1.421875 \r\nQ 18.84375 -1.421875 12.171875 6.21875 \r\nQ 5.515625 13.875 5.515625 27.296875 \r\nQ 5.515625 40.765625 12.171875 48.375 \r\nQ 18.84375 56 30.609375 56 \r\nz\r\n\" id=\"DejaVuSans-111\"/>\r\n      <path d=\"M 48.78125 52.59375 \r\nL 48.78125 44.1875 \r\nQ 44.96875 46.296875 41.140625 47.34375 \r\nQ 37.3125 48.390625 33.40625 48.390625 \r\nQ 24.65625 48.390625 19.8125 42.84375 \r\nQ 14.984375 37.3125 14.984375 27.296875 \r\nQ 14.984375 17.28125 19.8125 11.734375 \r\nQ 24.65625 6.203125 33.40625 6.203125 \r\nQ 37.3125 6.203125 41.140625 7.25 \r\nQ 44.96875 8.296875 48.78125 10.40625 \r\nL 48.78125 2.09375 \r\nQ 45.015625 0.34375 40.984375 -0.53125 \r\nQ 36.96875 -1.421875 32.421875 -1.421875 \r\nQ 20.0625 -1.421875 12.78125 6.34375 \r\nQ 5.515625 14.109375 5.515625 27.296875 \r\nQ 5.515625 40.671875 12.859375 48.328125 \r\nQ 20.21875 56 33.015625 56 \r\nQ 37.15625 56 41.109375 55.140625 \r\nQ 45.0625 54.296875 48.78125 52.59375 \r\nz\r\n\" id=\"DejaVuSans-99\"/>\r\n      <path d=\"M 54.890625 33.015625 \r\nL 54.890625 0 \r\nL 45.90625 0 \r\nL 45.90625 32.71875 \r\nQ 45.90625 40.484375 42.875 44.328125 \r\nQ 39.84375 48.1875 33.796875 48.1875 \r\nQ 26.515625 48.1875 22.3125 43.546875 \r\nQ 18.109375 38.921875 18.109375 30.90625 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 75.984375 \r\nL 18.109375 75.984375 \r\nL 18.109375 46.1875 \r\nQ 21.34375 51.125 25.703125 53.5625 \r\nQ 30.078125 56 35.796875 56 \r\nQ 45.21875 56 50.046875 50.171875 \r\nQ 54.890625 44.34375 54.890625 33.015625 \r\nz\r\n\" id=\"DejaVuSans-104\"/>\r\n      <path d=\"M 44.28125 53.078125 \r\nL 44.28125 44.578125 \r\nQ 40.484375 46.53125 36.375 47.5 \r\nQ 32.28125 48.484375 27.875 48.484375 \r\nQ 21.1875 48.484375 17.84375 46.4375 \r\nQ 14.5 44.390625 14.5 40.28125 \r\nQ 14.5 37.15625 16.890625 35.375 \r\nQ 19.28125 33.59375 26.515625 31.984375 \r\nL 29.59375 31.296875 \r\nQ 39.15625 29.25 43.1875 25.515625 \r\nQ 47.21875 21.78125 47.21875 15.09375 \r\nQ 47.21875 7.46875 41.1875 3.015625 \r\nQ 35.15625 -1.421875 24.609375 -1.421875 \r\nQ 20.21875 -1.421875 15.453125 -0.5625 \r\nQ 10.6875 0.296875 5.421875 2 \r\nL 5.421875 11.28125 \r\nQ 10.40625 8.6875 15.234375 7.390625 \r\nQ 20.0625 6.109375 24.8125 6.109375 \r\nQ 31.15625 6.109375 34.5625 8.28125 \r\nQ 37.984375 10.453125 37.984375 14.40625 \r\nQ 37.984375 18.0625 35.515625 20.015625 \r\nQ 33.0625 21.96875 24.703125 23.78125 \r\nL 21.578125 24.515625 \r\nQ 13.234375 26.265625 9.515625 29.90625 \r\nQ 5.8125 33.546875 5.8125 39.890625 \r\nQ 5.8125 47.609375 11.28125 51.796875 \r\nQ 16.75 56 26.8125 56 \r\nQ 31.78125 56 36.171875 55.265625 \r\nQ 40.578125 54.546875 44.28125 53.078125 \r\nz\r\n\" id=\"DejaVuSans-115\"/>\r\n     </defs>\r\n     <g transform=\"translate(199.628125 268.034687)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-69\"/>\r\n      <use x=\"63.183594\" xlink:href=\"#DejaVuSans-112\"/>\r\n      <use x=\"126.660156\" xlink:href=\"#DejaVuSans-111\"/>\r\n      <use x=\"187.841797\" xlink:href=\"#DejaVuSans-99\"/>\r\n      <use x=\"242.822266\" xlink:href=\"#DejaVuSans-104\"/>\r\n      <use x=\"306.201172\" xlink:href=\"#DejaVuSans-115\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n   <g id=\"matplotlib.axis_2\">\r\n    <g id=\"ytick_1\">\r\n     <g id=\"line2d_8\">\r\n      <defs>\r\n       <path d=\"M 0 0 \r\nL -3.5 0 \r\n\" id=\"mc1d3c1227a\" style=\"stroke:#000000;stroke-width:0.8;\"/>\r\n      </defs>\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mc1d3c1227a\" y=\"219.734935\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_9\">\r\n      <!-- 0.80 -->\r\n      <defs>\r\n       <path d=\"M 10.6875 12.40625 \r\nL 21 12.40625 \r\nL 21 0 \r\nL 10.6875 0 \r\nz\r\n\" id=\"DejaVuSans-46\"/>\r\n       <path d=\"M 31.78125 34.625 \r\nQ 24.75 34.625 20.71875 30.859375 \r\nQ 16.703125 27.09375 16.703125 20.515625 \r\nQ 16.703125 13.921875 20.71875 10.15625 \r\nQ 24.75 6.390625 31.78125 6.390625 \r\nQ 38.8125 6.390625 42.859375 10.171875 \r\nQ 46.921875 13.96875 46.921875 20.515625 \r\nQ 46.921875 27.09375 42.890625 30.859375 \r\nQ 38.875 34.625 31.78125 34.625 \r\nz\r\nM 21.921875 38.8125 \r\nQ 15.578125 40.375 12.03125 44.71875 \r\nQ 8.5 49.078125 8.5 55.328125 \r\nQ 8.5 64.0625 14.71875 69.140625 \r\nQ 20.953125 74.21875 31.78125 74.21875 \r\nQ 42.671875 74.21875 48.875 69.140625 \r\nQ 55.078125 64.0625 55.078125 55.328125 \r\nQ 55.078125 49.078125 51.53125 44.71875 \r\nQ 48 40.375 41.703125 38.8125 \r\nQ 48.828125 37.15625 52.796875 32.3125 \r\nQ 56.78125 27.484375 56.78125 20.515625 \r\nQ 56.78125 9.90625 50.3125 4.234375 \r\nQ 43.84375 -1.421875 31.78125 -1.421875 \r\nQ 19.734375 -1.421875 13.25 4.234375 \r\nQ 6.78125 9.90625 6.78125 20.515625 \r\nQ 6.78125 27.484375 10.78125 32.3125 \r\nQ 14.796875 37.15625 21.921875 38.8125 \r\nz\r\nM 18.3125 54.390625 \r\nQ 18.3125 48.734375 21.84375 45.5625 \r\nQ 25.390625 42.390625 31.78125 42.390625 \r\nQ 38.140625 42.390625 41.71875 45.5625 \r\nQ 45.3125 48.734375 45.3125 54.390625 \r\nQ 45.3125 60.0625 41.71875 63.234375 \r\nQ 38.140625 66.40625 31.78125 66.40625 \r\nQ 25.390625 66.40625 21.84375 63.234375 \r\nQ 18.3125 60.0625 18.3125 54.390625 \r\nz\r\n\" id=\"DejaVuSans-56\"/>\r\n      </defs>\r\n      <g transform=\"translate(20.878125 223.534153)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\r\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-56\"/>\r\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-48\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_2\">\r\n     <g id=\"line2d_9\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mc1d3c1227a\" y=\"179.744364\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_10\">\r\n      <!-- 0.82 -->\r\n      <g transform=\"translate(20.878125 183.543582)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\r\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-56\"/>\r\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-50\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_3\">\r\n     <g id=\"line2d_10\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mc1d3c1227a\" y=\"139.753793\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_11\">\r\n      <!-- 0.84 -->\r\n      <defs>\r\n       <path d=\"M 37.796875 64.3125 \r\nL 12.890625 25.390625 \r\nL 37.796875 25.390625 \r\nz\r\nM 35.203125 72.90625 \r\nL 47.609375 72.90625 \r\nL 47.609375 25.390625 \r\nL 58.015625 25.390625 \r\nL 58.015625 17.1875 \r\nL 47.609375 17.1875 \r\nL 47.609375 0 \r\nL 37.796875 0 \r\nL 37.796875 17.1875 \r\nL 4.890625 17.1875 \r\nL 4.890625 26.703125 \r\nz\r\n\" id=\"DejaVuSans-52\"/>\r\n      </defs>\r\n      <g transform=\"translate(20.878125 143.553012)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\r\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-56\"/>\r\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-52\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_4\">\r\n     <g id=\"line2d_11\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mc1d3c1227a\" y=\"99.763222\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_12\">\r\n      <!-- 0.86 -->\r\n      <defs>\r\n       <path d=\"M 33.015625 40.375 \r\nQ 26.375 40.375 22.484375 35.828125 \r\nQ 18.609375 31.296875 18.609375 23.390625 \r\nQ 18.609375 15.53125 22.484375 10.953125 \r\nQ 26.375 6.390625 33.015625 6.390625 \r\nQ 39.65625 6.390625 43.53125 10.953125 \r\nQ 47.40625 15.53125 47.40625 23.390625 \r\nQ 47.40625 31.296875 43.53125 35.828125 \r\nQ 39.65625 40.375 33.015625 40.375 \r\nz\r\nM 52.59375 71.296875 \r\nL 52.59375 62.3125 \r\nQ 48.875 64.0625 45.09375 64.984375 \r\nQ 41.3125 65.921875 37.59375 65.921875 \r\nQ 27.828125 65.921875 22.671875 59.328125 \r\nQ 17.53125 52.734375 16.796875 39.40625 \r\nQ 19.671875 43.65625 24.015625 45.921875 \r\nQ 28.375 48.1875 33.59375 48.1875 \r\nQ 44.578125 48.1875 50.953125 41.515625 \r\nQ 57.328125 34.859375 57.328125 23.390625 \r\nQ 57.328125 12.15625 50.6875 5.359375 \r\nQ 44.046875 -1.421875 33.015625 -1.421875 \r\nQ 20.359375 -1.421875 13.671875 8.265625 \r\nQ 6.984375 17.96875 6.984375 36.375 \r\nQ 6.984375 53.65625 15.1875 63.9375 \r\nQ 23.390625 74.21875 37.203125 74.21875 \r\nQ 40.921875 74.21875 44.703125 73.484375 \r\nQ 48.484375 72.75 52.59375 71.296875 \r\nz\r\n\" id=\"DejaVuSans-54\"/>\r\n      </defs>\r\n      <g transform=\"translate(20.878125 103.562441)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\r\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-56\"/>\r\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-54\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"ytick_5\">\r\n     <g id=\"line2d_12\">\r\n      <g>\r\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"50.14375\" xlink:href=\"#mc1d3c1227a\" y=\"59.772651\"/>\r\n      </g>\r\n     </g>\r\n     <g id=\"text_13\">\r\n      <!-- 0.88 -->\r\n      <g transform=\"translate(20.878125 63.57187)scale(0.1 -0.1)\">\r\n       <use xlink:href=\"#DejaVuSans-48\"/>\r\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-46\"/>\r\n       <use x=\"95.410156\" xlink:href=\"#DejaVuSans-56\"/>\r\n       <use x=\"159.033203\" xlink:href=\"#DejaVuSans-56\"/>\r\n      </g>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_14\">\r\n     <!-- auc -->\r\n     <defs>\r\n      <path d=\"M 34.28125 27.484375 \r\nQ 23.390625 27.484375 19.1875 25 \r\nQ 14.984375 22.515625 14.984375 16.5 \r\nQ 14.984375 11.71875 18.140625 8.90625 \r\nQ 21.296875 6.109375 26.703125 6.109375 \r\nQ 34.1875 6.109375 38.703125 11.40625 \r\nQ 43.21875 16.703125 43.21875 25.484375 \r\nL 43.21875 27.484375 \r\nz\r\nM 52.203125 31.203125 \r\nL 52.203125 0 \r\nL 43.21875 0 \r\nL 43.21875 8.296875 \r\nQ 40.140625 3.328125 35.546875 0.953125 \r\nQ 30.953125 -1.421875 24.3125 -1.421875 \r\nQ 15.921875 -1.421875 10.953125 3.296875 \r\nQ 6 8.015625 6 15.921875 \r\nQ 6 25.140625 12.171875 29.828125 \r\nQ 18.359375 34.515625 30.609375 34.515625 \r\nL 43.21875 34.515625 \r\nL 43.21875 35.40625 \r\nQ 43.21875 41.609375 39.140625 45 \r\nQ 35.0625 48.390625 27.6875 48.390625 \r\nQ 23 48.390625 18.546875 47.265625 \r\nQ 14.109375 46.140625 10.015625 43.890625 \r\nL 10.015625 52.203125 \r\nQ 14.9375 54.109375 19.578125 55.046875 \r\nQ 24.21875 56 28.609375 56 \r\nQ 40.484375 56 46.34375 49.84375 \r\nQ 52.203125 43.703125 52.203125 31.203125 \r\nz\r\n\" id=\"DejaVuSans-97\"/>\r\n      <path d=\"M 8.5 21.578125 \r\nL 8.5 54.6875 \r\nL 17.484375 54.6875 \r\nL 17.484375 21.921875 \r\nQ 17.484375 14.15625 20.5 10.265625 \r\nQ 23.53125 6.390625 29.59375 6.390625 \r\nQ 36.859375 6.390625 41.078125 11.03125 \r\nQ 45.3125 15.671875 45.3125 23.6875 \r\nL 45.3125 54.6875 \r\nL 54.296875 54.6875 \r\nL 54.296875 0 \r\nL 45.3125 0 \r\nL 45.3125 8.40625 \r\nQ 42.046875 3.421875 37.71875 1 \r\nQ 33.40625 -1.421875 27.6875 -1.421875 \r\nQ 18.265625 -1.421875 13.375 4.4375 \r\nQ 8.5 10.296875 8.5 21.578125 \r\nz\r\nM 31.109375 56 \r\nz\r\n\" id=\"DejaVuSans-117\"/>\r\n     </defs>\r\n     <g transform=\"translate(14.798438 140.020156)rotate(-90)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"61.279297\" xlink:href=\"#DejaVuSans-117\"/>\r\n      <use x=\"124.658203\" xlink:href=\"#DejaVuSans-99\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n   <g id=\"line2d_13\">\r\n    <path clip-path=\"url(#pe530cf96e6)\" d=\"M 65.361932 49.569083 \r\nL 75.85723 43.160352 \r\nL 86.352527 36.296589 \r\nL 96.847825 40.950614 \r\nL 107.343123 38.103495 \r\nL 117.838421 38.168568 \r\nL 128.333719 35.971701 \r\nL 138.829016 35.282595 \r\nL 149.324314 36.218644 \r\nL 159.819612 36.660568 \r\nL 170.31491 35.217761 \r\nL 180.810208 34.840671 \r\nL 191.305505 34.64581 \r\nL 201.800803 35.932609 \r\nL 212.296101 34.892753 \r\nL 222.791399 33.540643 \r\nL 233.286697 34.190657 \r\nL 243.781995 35.932728 \r\nL 254.277292 35.165678 \r\nL 264.77259 33.969814 \r\nL 275.267888 37.544535 \r\nL 285.763186 36.387643 \r\nL 296.258484 33.449827 \r\nL 306.753781 38.20754 \r\nL 317.249079 33.68366 \r\nL 327.744377 35.490566 \r\nL 338.239675 34.80158 \r\nL 348.734973 32.201761 \r\nL 359.23027 37.661452 \r\nL 369.725568 34.515545 \r\n\" style=\"fill:none;stroke:#0000ff;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    <defs>\r\n     <path d=\"M 0 3 \r\nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \r\nC 2.683901 1.55874 3 0.795609 3 0 \r\nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \r\nC 1.55874 -2.683901 0.795609 -3 0 -3 \r\nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \r\nC -2.683901 -1.55874 -3 -0.795609 -3 0 \r\nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \r\nC -1.55874 2.683901 -0.795609 3 0 3 \r\nz\r\n\" id=\"medd258bdb9\" style=\"stroke:#0000ff;\"/>\r\n    </defs>\r\n    <g clip-path=\"url(#pe530cf96e6)\">\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"65.361932\" xlink:href=\"#medd258bdb9\" y=\"49.569083\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"75.85723\" xlink:href=\"#medd258bdb9\" y=\"43.160352\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"86.352527\" xlink:href=\"#medd258bdb9\" y=\"36.296589\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"96.847825\" xlink:href=\"#medd258bdb9\" y=\"40.950614\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"107.343123\" xlink:href=\"#medd258bdb9\" y=\"38.103495\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"117.838421\" xlink:href=\"#medd258bdb9\" y=\"38.168568\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"128.333719\" xlink:href=\"#medd258bdb9\" y=\"35.971701\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"138.829016\" xlink:href=\"#medd258bdb9\" y=\"35.282595\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"149.324314\" xlink:href=\"#medd258bdb9\" y=\"36.218644\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"159.819612\" xlink:href=\"#medd258bdb9\" y=\"36.660568\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"170.31491\" xlink:href=\"#medd258bdb9\" y=\"35.217761\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"180.810208\" xlink:href=\"#medd258bdb9\" y=\"34.840671\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"191.305505\" xlink:href=\"#medd258bdb9\" y=\"34.64581\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"201.800803\" xlink:href=\"#medd258bdb9\" y=\"35.932609\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"212.296101\" xlink:href=\"#medd258bdb9\" y=\"34.892753\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"222.791399\" xlink:href=\"#medd258bdb9\" y=\"33.540643\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"233.286697\" xlink:href=\"#medd258bdb9\" y=\"34.190657\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"243.781995\" xlink:href=\"#medd258bdb9\" y=\"35.932728\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"254.277292\" xlink:href=\"#medd258bdb9\" y=\"35.165678\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"264.77259\" xlink:href=\"#medd258bdb9\" y=\"33.969814\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"275.267888\" xlink:href=\"#medd258bdb9\" y=\"37.544535\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"285.763186\" xlink:href=\"#medd258bdb9\" y=\"36.387643\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"296.258484\" xlink:href=\"#medd258bdb9\" y=\"33.449827\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"306.753781\" xlink:href=\"#medd258bdb9\" y=\"38.20754\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"317.249079\" xlink:href=\"#medd258bdb9\" y=\"33.68366\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"327.744377\" xlink:href=\"#medd258bdb9\" y=\"35.490566\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"338.239675\" xlink:href=\"#medd258bdb9\" y=\"34.80158\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"348.734973\" xlink:href=\"#medd258bdb9\" y=\"32.201761\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"359.23027\" xlink:href=\"#medd258bdb9\" y=\"37.661452\"/>\r\n     <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"369.725568\" xlink:href=\"#medd258bdb9\" y=\"34.515545\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"line2d_14\">\r\n    <path clip-path=\"url(#pe530cf96e6)\" d=\"M 65.361932 229.874489 \r\nL 75.85723 216.287476 \r\nL 86.352527 216.895896 \r\nL 96.847825 211.420473 \r\nL 107.343123 217.301469 \r\nL 117.838421 220.951631 \r\nL 128.333719 214.867908 \r\nL 138.829016 217.30135 \r\nL 149.324314 215.476328 \r\nL 159.819612 218.720917 \r\nL 170.31491 215.070755 \r\nL 180.810208 215.679056 \r\nL 191.305505 219.329337 \r\nL 201.800803 215.679056 \r\nL 212.296101 213.448341 \r\nL 222.791399 215.070755 \r\nL 233.286697 221.762779 \r\nL 243.781995 210.40648 \r\nL 254.277292 210.000906 \r\nL 264.77259 211.014781 \r\nL 275.267888 219.12661 \r\nL 285.763186 215.070755 \r\nL 296.258484 211.623201 \r\nL 306.753781 212.434467 \r\nL 317.249079 214.259608 \r\nL 327.744377 210.609445 \r\nL 338.239675 211.826166 \r\nL 348.734973 208.784066 \r\nL 359.23027 209.798179 \r\nL 369.725568 209.18964 \r\n\" style=\"fill:none;stroke:#ff0000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    <defs>\r\n     <path d=\"M 0 3 \r\nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \r\nC 2.683901 1.55874 3 0.795609 3 0 \r\nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \r\nC 1.55874 -2.683901 0.795609 -3 0 -3 \r\nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \r\nC -2.683901 -1.55874 -3 -0.795609 -3 0 \r\nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \r\nC -1.55874 2.683901 -0.795609 3 0 3 \r\nz\r\n\" id=\"me15af77146\" style=\"stroke:#ff0000;\"/>\r\n    </defs>\r\n    <g clip-path=\"url(#pe530cf96e6)\">\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"65.361932\" xlink:href=\"#me15af77146\" y=\"229.874489\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"75.85723\" xlink:href=\"#me15af77146\" y=\"216.287476\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"86.352527\" xlink:href=\"#me15af77146\" y=\"216.895896\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"96.847825\" xlink:href=\"#me15af77146\" y=\"211.420473\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"107.343123\" xlink:href=\"#me15af77146\" y=\"217.301469\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"117.838421\" xlink:href=\"#me15af77146\" y=\"220.951631\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"128.333719\" xlink:href=\"#me15af77146\" y=\"214.867908\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"138.829016\" xlink:href=\"#me15af77146\" y=\"217.30135\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"149.324314\" xlink:href=\"#me15af77146\" y=\"215.476328\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"159.819612\" xlink:href=\"#me15af77146\" y=\"218.720917\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"170.31491\" xlink:href=\"#me15af77146\" y=\"215.070755\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"180.810208\" xlink:href=\"#me15af77146\" y=\"215.679056\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"191.305505\" xlink:href=\"#me15af77146\" y=\"219.329337\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"201.800803\" xlink:href=\"#me15af77146\" y=\"215.679056\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"212.296101\" xlink:href=\"#me15af77146\" y=\"213.448341\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"222.791399\" xlink:href=\"#me15af77146\" y=\"215.070755\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"233.286697\" xlink:href=\"#me15af77146\" y=\"221.762779\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"243.781995\" xlink:href=\"#me15af77146\" y=\"210.40648\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"254.277292\" xlink:href=\"#me15af77146\" y=\"210.000906\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"264.77259\" xlink:href=\"#me15af77146\" y=\"211.014781\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"275.267888\" xlink:href=\"#me15af77146\" y=\"219.12661\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"285.763186\" xlink:href=\"#me15af77146\" y=\"215.070755\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"296.258484\" xlink:href=\"#me15af77146\" y=\"211.623201\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"306.753781\" xlink:href=\"#me15af77146\" y=\"212.434467\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"317.249079\" xlink:href=\"#me15af77146\" y=\"214.259608\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"327.744377\" xlink:href=\"#me15af77146\" y=\"210.609445\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"338.239675\" xlink:href=\"#me15af77146\" y=\"211.826166\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"348.734973\" xlink:href=\"#me15af77146\" y=\"208.784066\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"359.23027\" xlink:href=\"#me15af77146\" y=\"209.798179\"/>\r\n     <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"369.725568\" xlink:href=\"#me15af77146\" y=\"209.18964\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"patch_3\">\r\n    <path d=\"M 50.14375 239.758125 \r\nL 50.14375 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_4\">\r\n    <path d=\"M 384.94375 239.758125 \r\nL 384.94375 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_5\">\r\n    <path d=\"M 50.14375 239.758125 \r\nL 384.94375 239.758125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"patch_6\">\r\n    <path d=\"M 50.14375 22.318125 \r\nL 384.94375 22.318125 \r\n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\r\n   </g>\r\n   <g id=\"text_15\">\r\n    <!-- Training and validation auc -->\r\n    <defs>\r\n     <path d=\"M -0.296875 72.90625 \r\nL 61.375 72.90625 \r\nL 61.375 64.59375 \r\nL 35.5 64.59375 \r\nL 35.5 0 \r\nL 25.59375 0 \r\nL 25.59375 64.59375 \r\nL -0.296875 64.59375 \r\nz\r\n\" id=\"DejaVuSans-84\"/>\r\n     <path d=\"M 41.109375 46.296875 \r\nQ 39.59375 47.171875 37.8125 47.578125 \r\nQ 36.03125 48 33.890625 48 \r\nQ 26.265625 48 22.1875 43.046875 \r\nQ 18.109375 38.09375 18.109375 28.8125 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.1875 \r\nQ 20.953125 51.171875 25.484375 53.578125 \r\nQ 30.03125 56 36.53125 56 \r\nQ 37.453125 56 38.578125 55.875 \r\nQ 39.703125 55.765625 41.0625 55.515625 \r\nz\r\n\" id=\"DejaVuSans-114\"/>\r\n     <path d=\"M 9.421875 54.6875 \r\nL 18.40625 54.6875 \r\nL 18.40625 0 \r\nL 9.421875 0 \r\nz\r\nM 9.421875 75.984375 \r\nL 18.40625 75.984375 \r\nL 18.40625 64.59375 \r\nL 9.421875 64.59375 \r\nz\r\n\" id=\"DejaVuSans-105\"/>\r\n     <path d=\"M 54.890625 33.015625 \r\nL 54.890625 0 \r\nL 45.90625 0 \r\nL 45.90625 32.71875 \r\nQ 45.90625 40.484375 42.875 44.328125 \r\nQ 39.84375 48.1875 33.796875 48.1875 \r\nQ 26.515625 48.1875 22.3125 43.546875 \r\nQ 18.109375 38.921875 18.109375 30.90625 \r\nL 18.109375 0 \r\nL 9.078125 0 \r\nL 9.078125 54.6875 \r\nL 18.109375 54.6875 \r\nL 18.109375 46.1875 \r\nQ 21.34375 51.125 25.703125 53.5625 \r\nQ 30.078125 56 35.796875 56 \r\nQ 45.21875 56 50.046875 50.171875 \r\nQ 54.890625 44.34375 54.890625 33.015625 \r\nz\r\n\" id=\"DejaVuSans-110\"/>\r\n     <path d=\"M 45.40625 27.984375 \r\nQ 45.40625 37.75 41.375 43.109375 \r\nQ 37.359375 48.484375 30.078125 48.484375 \r\nQ 22.859375 48.484375 18.828125 43.109375 \r\nQ 14.796875 37.75 14.796875 27.984375 \r\nQ 14.796875 18.265625 18.828125 12.890625 \r\nQ 22.859375 7.515625 30.078125 7.515625 \r\nQ 37.359375 7.515625 41.375 12.890625 \r\nQ 45.40625 18.265625 45.40625 27.984375 \r\nz\r\nM 54.390625 6.78125 \r\nQ 54.390625 -7.171875 48.1875 -13.984375 \r\nQ 42 -20.796875 29.203125 -20.796875 \r\nQ 24.46875 -20.796875 20.265625 -20.09375 \r\nQ 16.0625 -19.390625 12.109375 -17.921875 \r\nL 12.109375 -9.1875 \r\nQ 16.0625 -11.328125 19.921875 -12.34375 \r\nQ 23.78125 -13.375 27.78125 -13.375 \r\nQ 36.625 -13.375 41.015625 -8.765625 \r\nQ 45.40625 -4.15625 45.40625 5.171875 \r\nL 45.40625 9.625 \r\nQ 42.625 4.78125 38.28125 2.390625 \r\nQ 33.9375 0 27.875 0 \r\nQ 17.828125 0 11.671875 7.65625 \r\nQ 5.515625 15.328125 5.515625 27.984375 \r\nQ 5.515625 40.671875 11.671875 48.328125 \r\nQ 17.828125 56 27.875 56 \r\nQ 33.9375 56 38.28125 53.609375 \r\nQ 42.625 51.21875 45.40625 46.390625 \r\nL 45.40625 54.6875 \r\nL 54.390625 54.6875 \r\nz\r\n\" id=\"DejaVuSans-103\"/>\r\n     <path id=\"DejaVuSans-32\"/>\r\n     <path d=\"M 45.40625 46.390625 \r\nL 45.40625 75.984375 \r\nL 54.390625 75.984375 \r\nL 54.390625 0 \r\nL 45.40625 0 \r\nL 45.40625 8.203125 \r\nQ 42.578125 3.328125 38.25 0.953125 \r\nQ 33.9375 -1.421875 27.875 -1.421875 \r\nQ 17.96875 -1.421875 11.734375 6.484375 \r\nQ 5.515625 14.40625 5.515625 27.296875 \r\nQ 5.515625 40.1875 11.734375 48.09375 \r\nQ 17.96875 56 27.875 56 \r\nQ 33.9375 56 38.25 53.625 \r\nQ 42.578125 51.265625 45.40625 46.390625 \r\nz\r\nM 14.796875 27.296875 \r\nQ 14.796875 17.390625 18.875 11.75 \r\nQ 22.953125 6.109375 30.078125 6.109375 \r\nQ 37.203125 6.109375 41.296875 11.75 \r\nQ 45.40625 17.390625 45.40625 27.296875 \r\nQ 45.40625 37.203125 41.296875 42.84375 \r\nQ 37.203125 48.484375 30.078125 48.484375 \r\nQ 22.953125 48.484375 18.875 42.84375 \r\nQ 14.796875 37.203125 14.796875 27.296875 \r\nz\r\n\" id=\"DejaVuSans-100\"/>\r\n     <path d=\"M 2.984375 54.6875 \r\nL 12.5 54.6875 \r\nL 29.59375 8.796875 \r\nL 46.6875 54.6875 \r\nL 56.203125 54.6875 \r\nL 35.6875 0 \r\nL 23.484375 0 \r\nz\r\n\" id=\"DejaVuSans-118\"/>\r\n     <path d=\"M 9.421875 75.984375 \r\nL 18.40625 75.984375 \r\nL 18.40625 0 \r\nL 9.421875 0 \r\nz\r\n\" id=\"DejaVuSans-108\"/>\r\n     <path d=\"M 18.3125 70.21875 \r\nL 18.3125 54.6875 \r\nL 36.8125 54.6875 \r\nL 36.8125 47.703125 \r\nL 18.3125 47.703125 \r\nL 18.3125 18.015625 \r\nQ 18.3125 11.328125 20.140625 9.421875 \r\nQ 21.96875 7.515625 27.59375 7.515625 \r\nL 36.8125 7.515625 \r\nL 36.8125 0 \r\nL 27.59375 0 \r\nQ 17.1875 0 13.234375 3.875 \r\nQ 9.28125 7.765625 9.28125 18.015625 \r\nL 9.28125 47.703125 \r\nL 2.6875 47.703125 \r\nL 2.6875 54.6875 \r\nL 9.28125 54.6875 \r\nL 9.28125 70.21875 \r\nz\r\n\" id=\"DejaVuSans-116\"/>\r\n    </defs>\r\n    <g transform=\"translate(136.544688 16.318125)scale(0.12 -0.12)\">\r\n     <use xlink:href=\"#DejaVuSans-84\"/>\r\n     <use x=\"46.333984\" xlink:href=\"#DejaVuSans-114\"/>\r\n     <use x=\"87.447266\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"148.726562\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"176.509766\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"239.888672\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"267.671875\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"331.050781\" xlink:href=\"#DejaVuSans-103\"/>\r\n     <use x=\"394.527344\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"426.314453\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"487.59375\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"550.972656\" xlink:href=\"#DejaVuSans-100\"/>\r\n     <use x=\"614.449219\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"646.236328\" xlink:href=\"#DejaVuSans-118\"/>\r\n     <use x=\"705.416016\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"766.695312\" xlink:href=\"#DejaVuSans-108\"/>\r\n     <use x=\"794.478516\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"822.261719\" xlink:href=\"#DejaVuSans-100\"/>\r\n     <use x=\"885.738281\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"947.017578\" xlink:href=\"#DejaVuSans-116\"/>\r\n     <use x=\"986.226562\" xlink:href=\"#DejaVuSans-105\"/>\r\n     <use x=\"1014.009766\" xlink:href=\"#DejaVuSans-111\"/>\r\n     <use x=\"1075.191406\" xlink:href=\"#DejaVuSans-110\"/>\r\n     <use x=\"1138.570312\" xlink:href=\"#DejaVuSans-32\"/>\r\n     <use x=\"1170.357422\" xlink:href=\"#DejaVuSans-97\"/>\r\n     <use x=\"1231.636719\" xlink:href=\"#DejaVuSans-117\"/>\r\n     <use x=\"1295.015625\" xlink:href=\"#DejaVuSans-99\"/>\r\n    </g>\r\n   </g>\r\n   <g id=\"legend_1\">\r\n    <g id=\"patch_7\">\r\n     <path d=\"M 299.704688 147.494375 \r\nL 377.94375 147.494375 \r\nQ 379.94375 147.494375 379.94375 145.494375 \r\nL 379.94375 116.581875 \r\nQ 379.94375 114.581875 377.94375 114.581875 \r\nL 299.704688 114.581875 \r\nQ 297.704688 114.581875 297.704688 116.581875 \r\nL 297.704688 145.494375 \r\nQ 297.704688 147.494375 299.704688 147.494375 \r\nz\r\n\" style=\"fill:#ffffff;opacity:0.8;stroke:#cccccc;stroke-linejoin:miter;\"/>\r\n    </g>\r\n    <g id=\"line2d_15\">\r\n     <path d=\"M 301.704688 122.680312 \r\nL 321.704688 122.680312 \r\n\" style=\"fill:none;stroke:#0000ff;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    </g>\r\n    <g id=\"line2d_16\">\r\n     <g>\r\n      <use style=\"fill:#0000ff;stroke:#0000ff;\" x=\"311.704688\" xlink:href=\"#medd258bdb9\" y=\"122.680312\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_16\">\r\n     <!-- train_auc -->\r\n     <defs>\r\n      <path d=\"M 50.984375 -16.609375 \r\nL 50.984375 -23.578125 \r\nL -0.984375 -23.578125 \r\nL -0.984375 -16.609375 \r\nz\r\n\" id=\"DejaVuSans-95\"/>\r\n     </defs>\r\n     <g transform=\"translate(329.704688 126.180312)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-116\"/>\r\n      <use x=\"39.208984\" xlink:href=\"#DejaVuSans-114\"/>\r\n      <use x=\"80.322266\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"141.601562\" xlink:href=\"#DejaVuSans-105\"/>\r\n      <use x=\"169.384766\" xlink:href=\"#DejaVuSans-110\"/>\r\n      <use x=\"232.763672\" xlink:href=\"#DejaVuSans-95\"/>\r\n      <use x=\"282.763672\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"344.042969\" xlink:href=\"#DejaVuSans-117\"/>\r\n      <use x=\"407.421875\" xlink:href=\"#DejaVuSans-99\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"line2d_17\">\r\n     <path d=\"M 301.704688 137.636562 \r\nL 321.704688 137.636562 \r\n\" style=\"fill:none;stroke:#ff0000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-width:1.5;\"/>\r\n    </g>\r\n    <g id=\"line2d_18\">\r\n     <g>\r\n      <use style=\"fill:#ff0000;stroke:#ff0000;\" x=\"311.704688\" xlink:href=\"#me15af77146\" y=\"137.636562\"/>\r\n     </g>\r\n    </g>\r\n    <g id=\"text_17\">\r\n     <!-- val_auc -->\r\n     <g transform=\"translate(329.704688 141.136562)scale(0.1 -0.1)\">\r\n      <use xlink:href=\"#DejaVuSans-118\"/>\r\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"120.458984\" xlink:href=\"#DejaVuSans-108\"/>\r\n      <use x=\"148.242188\" xlink:href=\"#DejaVuSans-95\"/>\r\n      <use x=\"198.242188\" xlink:href=\"#DejaVuSans-97\"/>\r\n      <use x=\"259.521484\" xlink:href=\"#DejaVuSans-117\"/>\r\n      <use x=\"322.900391\" xlink:href=\"#DejaVuSans-99\"/>\r\n     </g>\r\n    </g>\r\n   </g>\r\n  </g>\r\n </g>\r\n <defs>\r\n  <clipPath id=\"pe530cf96e6\">\r\n   <rect height=\"217.44\" width=\"334.8\" x=\"50.14375\" y=\"22.318125\"/>\r\n  </clipPath>\r\n </defs>\r\n</svg>\r\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_metric(history,'auc')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[0.0757184 ],\n       [0.7116666 ],\n       [0.47549316],\n       [0.7965557 ],\n       [0.63861084],\n       [0.8715132 ],\n       [0.05177903],\n       [0.89567673],\n       [0.5326344 ],\n       [0.09154999]], dtype=float32)"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.predict(x_test[0:10])"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From <ipython-input-19-a0d9762aeef6>:1: Sequential.predict_classes (from tensorflow.python.keras.engine.sequential) is deprecated and will be removed after 2021-01-01.\n",
      "Instructions for updating:\n",
      "Please use instead:* `np.argmax(model.predict(x), axis=-1)`,   if your model does multi-class classification   (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype(\"int32\")`,   if your model does binary classification   (e.g. if it uses a `sigmoid` last-layer activation).\n"
     ]
    },
    {
     "data": {
      "text/plain": "array([[0],\n       [1],\n       [0],\n       [1],\n       [1],\n       [1],\n       [0],\n       [1],\n       [1],\n       [0]])"
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.predict_classes(x_test[0:10])"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6/6 [==============================] - 0s 1ms/step - loss: 0.4524 - auc: 0.8564\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n"
     ]
    },
    {
     "data": {
      "text/plain": "[0.4523760974407196, 0.8563902378082275]"
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#model.save('./model/keras_model.h5')\n",
    "#del model  #删除现有模型\n",
    "\n",
    "# identical to the previous one\n",
    "model = models.load_model('./model/keras_model.h5')\n",
    "model.evaluate(x_test,y_test)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6/6 [==============================] - 0s 1ms/step - loss: 0.4524 - auc: 0.8564\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n"
     ]
    },
    {
     "data": {
      "text/plain": "[0.4523760974407196, 0.8563902378082275]"
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "json_str = model.to_json()\n",
    "\n",
    "# 恢复模型结构\n",
    "model_json = models.model_from_json(json_str)\n",
    "model.save_weights('./model/keras_model_weight.h5')\n",
    "model_json.compile(\n",
    "    optimizer='adam',\n",
    "    loss='binary_crossentropy',\n",
    "    metrics=['AUC']\n",
    ")\n",
    "\n",
    "model_json.load_weights('./model/keras_model_weight.h5')\n",
    "model_json.evaluate(x_test,y_test)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "outputs": [],
   "source": [
    "model.save_weights('./model/tf_model_weights.ckpt',save_format='tf')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO:tensorflow:Assets written to: ./model/tf_model_savemodel\\assets\n",
      "Export saved model.\n",
      "6/6 [==============================] - 0s 2ms/step - loss: 0.4524 - auc: 0.8564\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n"
     ]
    },
    {
     "data": {
      "text/plain": "[0.4523760974407196, 0.8563902378082275]"
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.save(\"./model/tf_model_savemodel\",save_format='tf')\n",
    "print(\"Export saved model.\")\n",
    "\n",
    "model_loaded = tf.keras.models.load_model(\"./model/tf_model_savemodel\")\n",
    "model_loaded.evaluate(x_test,y_test)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}